sex after d&c??

Hey all I had a d&c done march 3rd due to severe medical issues with my baby... I know I'm not supposed to have vaginal sex for at least 3 weeks and I haven't. I was just visiting my boyfriend for the weekend and we had anal sex twice. The drs never mentioned about anal sex and since it wasn't anywhere near my cervix or anything I thought it was ok but we were caught up in the moment. So is it ok to have anal sex for the time being? Saturday was the first time we did anything since the d&c and it was just me giving oral and having anal sex.