All working 'socialism' discriminates. It has to.
They take it to the next stage.
The only perfect system of socialism is one without borders and without boundaries, and that doesn't, and has never existed, and is unlikely to. Thus, we accept that socialism is something that can describe a less than perfect example of it but bearing the hallmarks - society, the state, providing for those they accept into it.
Thus, national socialism, is still a form of socialism, if a limited and oxymoronic one.