
In Kerala, as long as you don't share the same family name, it's alright to get married to each other. We are a matrilineal society and inherit our mother's family name and so do our prospective partners.
So a girl/boy can marry her/his mother's brother's son/daughter, as they belong to the family of the aunt (the brother's wife).
Similarly, they can also marry their father's sister's son/daughter for the same reason.
Sons and daughters of direct brothers and sisters automatically became siblings. Marriage wasn't permitted between these people. Although the children of brothers are technically from different families, it is still not allowed.
All other relative marriages are okay, provided the generation level is maintained. In Tamil Nadu, for instance, it was permitted for a man to marry his sister's daughter. This would be seen as incest in Kerala. So, there were regional differences.
This isn't the case in other parts of India where patrilineal societies exist.