From: Michael Tremer Date: Sun, 23 Sep 2018 17:55:37 +0000 (+0200) Subject: hotplug: Do not attempt to remove the special ip6gre0 device X-Git-Tag: 010~11 X-Git-Url: http://git.ipfire.org/?p=people%2Fms%2Fnetwork.git;a=commitdiff_plain;h=23017c3a17e951cda6a2738cb7b13a1742eb896b hotplug: Do not attempt to remove the special ip6gre0 device Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.device b/src/functions/functions.device index b753ae37..48f24403 100644 --- a/src/functions/functions.device +++ b/src/functions/functions.device @@ -305,6 +305,13 @@ device_is_gre() { __device_type_matches "${device}" 778 } +device_is_gre6() { + local device="${1}" + assert isset device + + __device_type_matches "${device}" 823 +} + device_is_vti() { local device="${1}" assert isset device diff --git a/src/udev/network-hotplug b/src/udev/network-hotplug index ba065734..42bf3196 100644 --- a/src/udev/network-hotplug +++ b/src/udev/network-hotplug @@ -85,8 +85,13 @@ case "${SUBSYSTEM}" in # 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 - if device_is_gre "${INTERFACE}" && [ "${INTERFACE}" = "gre0" ]; then + elif device_is_gre "${INTERFACE}" && [ "${INTERFACE}" = "gre0" ]; then log DEBUG "gre0 cannot be removed" exit ${EXIT_OK}