Don't crash if netmask is not configured correctly

Ticket: #4265