Update network-functions.sh

Improved MAC validation