From: Michael Tremer Date: Sun, 23 Sep 2018 18:01:25 +0000 (+0200) Subject: hotplug: Handle special devices by name only X-Git-Tag: 010~10 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0de04f89fd77c7567b2b7f463c30a5dafb555c4c;p=network.git hotplug: Handle special devices by name only Signed-off-by: Michael Tremer --- diff --git a/src/udev/network-hotplug b/src/udev/network-hotplug index 42bf3196..873238f6 100644 --- a/src/udev/network-hotplug +++ b/src/udev/network-hotplug @@ -81,26 +81,17 @@ case "${SUBSYSTEM}" in if ! zone_exists "${INTERFACE}" && ! port_exists "${INTERFACE}"; then case "${ACTION}" in add) + # Ignore this for some special devices + case "${INTERFACE}" in + gre0|ip6gre0|ip6tnl0|ip6_vti0|ip_vti0) + log DEBUG "Ignoring special device ${INTERFACE}" + ;; + esac + log WARNING "Got to hotplug event for a port which does not exist: ${INTERFACE}" # Try to remove the device again - # GRE6 - if device_is_gre6 "${INTERFACE}" && [ "${INTERFACE}" = "ip6gre0" ]; then - log DEBUG "ip6gre0 cannot be removed" - exit ${EXIT_OK} - - # GRE - elif device_is_gre "${INTERFACE}" && [ "${INTERFACE}" = "gre0" ]; then - log DEBUG "gre0 cannot be removed" - exit ${EXIT_OK} - - # VTI - elif device_is_vti "${INTERFACE}" && [ "${INTERFACE}" = "ip_vti0" ]; then - log DEBUG "ip_vti0 cannot be removed" - exit ${EXIT_OK} - fi - TYPE="$(device_get_type "${INTERFACE}")" case "${TYPE}" in bonding)