fix bug #335: correctly verify ipv4 network masks