From 0de04f89fd77c7567b2b7f463c30a5dafb555c4c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 23 Sep 2018 20:01:25 +0200 Subject: [PATCH] hotplug: Handle special devices by name only Signed-off-by: Michael Tremer --- src/udev/network-hotplug | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) 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) -- 2.47.2