From: Michael Tremer Date: Sun, 23 Sep 2018 18:25:15 +0000 (+0200) Subject: Do not allow to create ethernet devices with an invalid MAC address X-Git-Tag: 010~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e4629f63396d6cc00f82416c5b0789b92f28f9d;p=people%2Fms%2Fnetwork.git Do not allow to create ethernet devices with an invalid MAC address Signed-off-by: Michael Tremer --- diff --git a/src/hooks/ports/ethernet b/src/hooks/ports/ethernet index cdc3dec7..0d9c5cd6 100644 --- a/src/hooks/ports/ethernet +++ b/src/hooks/ports/ethernet @@ -29,6 +29,9 @@ HOOK_SETTINGS="ADDRESS ADVERTISED_LINK_SPEEDS DEVICE OFFLOADING MTU" hook_check_settings() { assert ismac DEVICE + # Invalid MAC addresses are not allowed + assert not isoneof DEVICE 00:00:00:00:00:00 ff:ff:ff:ff:ff:ff + if isset ADDRESS; then assert ismac ADDRESS fi