diff --git a/files/qemu-ifup b/files/qemu-ifup index b712c8e..c5d6070 100755 --- a/files/qemu-ifup +++ b/files/qemu-ifup @@ -2,6 +2,11 @@ set -Eeuo pipefail IFACE=$1 +if [ ${#IFACE} -gt 14 ]; then + echo "interface name too long, mac 14 char: $IFACE" + exit 10 +fi + source /etc/libvirt/hooks/$IFACE if ! [[ $CLUSTER =~ ^[0-9]+$ ]]; then diff --git a/files/qemu-ifup-public b/files/qemu-ifup-public index 3ec9c30..8216ca7 100755 --- a/files/qemu-ifup-public +++ b/files/qemu-ifup-public @@ -2,6 +2,11 @@ set -Eeuo pipefail IFACE=$1 +if [ ${#IFACE} -gt 14 ]; then + echo "interface name too long, mac 14 char: $IFACE" + exit 10 +fi + source /etc/libvirt/hooks/$IFACE ### I need to keep this for backwards compatibility but PUBLICMAC should always be set since it absolutely needs to match the MAC the VM has been assigned by qemu. otherwise nothign will work