Such punishment based on the spurious concept of last name based caste (not in Hindu scripture) violates basic tenet of Hindu ethics.
Vidura on virtue
Vidura said, ‘Study of the various scriptures,
asceticism, gift, faith, performance of sacrifices, forgiveness,
sincerity of disposition, compassion, truth, self-restraint, these
constitute possessions of Virtue. Do thou adopt Virtue. Let not, thy
heart ever turn away from it. Both Virtue and Profit have their roots
in these. I think that all these are capable of being included in one
term. It is upon Virtue that all the worlds depend (for their
existence). It is by Virtue that the gods attained to their position
of superiority. It is upon Virtue that Profit or Wealth rests. Virtue,
O king, is foremost in point of merit. Profit is said to be middling.
Desire, it is said by the wise, is the lowest of the three. For this
reason, one should live with restrained soul, giving his attention to
virtue most. One should also behave towards all creatures as he
should towards himself.
Mahabharata Santi Parva Section CLXVII
Vidura on how to treat others
That which is antagonistic to one’s own self, should never be applied
in respect of another.
[Mahabharata, Udyoga Parva, Section 39]
Bhishma’s morality
Bhishma said, ‘Knowing how painful it is to himself, a person should
never do that to others which he dislikes when done to him by others.’
Mahabharata Santi Parva Section CCLX
Moral guidelines for the Righteous
Yudhishthira said, ‘Abstentions from injury, the observances of the
Vedic ritual, meditation, subjugation of the senses, penances, and
obedient services rendered to the preceptors - which amongst these is
fraught with the greatest merit with respect to a person?’
Vrihaspati said, ‘All these six are fraught with merit. They are
different doors of piety. I shall discourse upon them presently. Do
thou listen to them, O chief of the Bharatas! I shall tell thee what
constitutes the highest good of a human being. That man who practices
the religion of universal compassion achieves his highest good. That
man who keeps under control the three faults, viz., lust, wrath, and
cupidity, ,,, (and practises the virtue of compassion), attains to
success. ……. That man who regards all creatures as his own self, and
behaves towards them as towards his own self, laying aside the rod of
chastisement and completely subjugating his wrath, succeeds in
attaining to happiness. ….One should never do that to another, which
one regards as injurious to one’s own self. This, in brief, is the
rule of righteousness.
Mahabharata Anusasana Parva Section CXIII