From 23017c3a17e951cda6a2738cb7b13a1742eb896b Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 23 Sep 2018 19:55:37 +0200 Subject: [PATCH] hotplug: Do not attempt to remove the special ip6gre0 device Signed-off-by: Michael Tremer --- src/functions/functions.device | 7 +++++++ src/udev/network-hotplug | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) 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} -- 2.39.2