While what you say is true, for the benefit of the readers not very familiar with India I would like to add a few things for context. If from the name of the politician linked by the parent comment you come to the conclusion that homosexuality is frowned upon only by muslim politicians, you couldnt be more wrong. India is an incredibly high variance country. In some metros you would find gay pubs and bars, open kissing on the streets among gay partners with no one bothered a bit (if your state is one of the right wing ones then YMMV). Then again there are states (correlated with Hindi and Haryanvi speaking regions) where parents and family would kill their children, subject them to community sanctioned gang-rape because they married or proposed to marry someone considered different. Note that these 'punishments' and 'corrective measures' have popular sanction within the community and the perpetrators often voluntarily surrender after the incident.
It is as if India remains frozen in different centuries in different regions, ranging from the modern to the grotesquely medieval. If you ask your local hindu rightwinger, its of course all the muslim invaders fault that they have to keep continuing these practices. Hinduism of course has done nobody no wrong, just been stabbed in the back (this should sound familiar).
Anal sex (in fact anything apart from missionary position) continues to be a crime according to law but it is not something that gets enforced unless the enforcer has some specific axe to grind. That law certainly does not represent practice. Indian legal system is another weird thing. Most of the laws were set down by the colonizers, not to set a framework for justice but to facilitate control. We as Indians have done little to dispose that baggage, rather it has been actively embraced by those in power to exercise similar control, often with a lot of popular support.
Quite interestingly, a marginalized community would see nothing wrong in cruel treatment of another marginalized community, often happily taking the lead in the harassment. A low caste person in a caste'ist state would see nothing wrong in hounding someone just because he is muslim, or belongs to a caste that is even lower. A gay person in such a state may see nothing wrong in persecuting other minorities.