]> git.ipfire.org Git - people/stevee/network.git/commitdiff
hotplug: Do not attempt to remove the special ip6gre0 device
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Sep 2018 17:55:37 +0000 (19:55 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Sep 2018 17:58:41 +0000 (19:58 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.device
src/udev/network-hotplug

index b753ae378da2fd0bf721417c98fba520dd143a4d..48f2440398d5aa96c0a6cd428e9d6e504f6578fb 100644 (file)
@@ -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
index ba0657342d8c04e114fbc48e1c7e1e6d93d337bc..42bf319605d2c5395f384dceaa1db310ac99c730 100644 (file)
@@ -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}