fixes #7430 - Adds subnet mask validation

This comment doesn't really say anything that the method name doesn't say already :smile: