From: Michael Tremer Date: Sun, 23 Sep 2018 17:51:26 +0000 (+0200) Subject: hotplug: Don't try to remove gre0 X-Git-Tag: 010~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e54199b6a2d8577221e3d7a0181b172aa31f4788;p=network.git hotplug: Don't try to remove gre0 This device cannot be removed Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.device b/src/functions/functions.device index f5162391..b753ae37 100644 --- a/src/functions/functions.device +++ b/src/functions/functions.device @@ -298,6 +298,13 @@ device_is_wireless() { [ -d "${SYS_CLASS_NET}/${device}/phy80211" ] } +device_is_gre() { + local device="${1}" + assert isset device + + __device_type_matches "${device}" 778 +} + device_is_vti() { local device="${1}" assert isset device diff --git a/src/udev/network-hotplug b/src/udev/network-hotplug index f058dd75..c810bf2e 100644 --- a/src/udev/network-hotplug +++ b/src/udev/network-hotplug @@ -84,6 +84,13 @@ case "${SUBSYSTEM}" in log WARNING "Got to hotplug event for a port which does not exist: ${INTERFACE}" # Try to remove the device again + + # GRE + if device_is_gre "${INTERFACE}" && [ "${INTERFACE}" = "gre0" ]; then + log DEBUG "gre0 cannot be removed" + exit ${EXIT_OK} + fi + TYPE="$(device_get_type "${INTERFACE}")" case "${TYPE}" in bonding)