From: Michael Tremer Date: Sun, 23 Sep 2018 18:34:59 +0000 (+0200) Subject: hotplug: Do not attempt to rename any devices with an invalid MAC address X-Git-Tag: 010~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=285bb232a57a88caca782d322f7a810c7ca2e699;p=network.git hotplug: Do not attempt to rename any devices with an invalid MAC address Signed-off-by: Michael Tremer --- diff --git a/src/udev/network-hotplug-rename b/src/udev/network-hotplug-rename index 25091649..903a07ca 100644 --- a/src/udev/network-hotplug-rename +++ b/src/udev/network-hotplug-rename @@ -46,6 +46,14 @@ fi # Everything is wrapped into a function so that we can use locking on it main() { + # Check if the device has a unique MAC address (which is + # what are using to uniquely identify an interface) + local address="$(device_get_address "${INTERFACE}")" + if isset address && [ "${address}" = "00:00:00:00:00:00" ]; then + log DEBUG "Ignoring interface ${INTERFACE} with invalid MAC address ${address}" + return ${EXIT_OK} + fi + # Determine the type of the device and then see what # we need to do with it. local type="$(device_get_type "${INTERFACE}")"