]> TLD Linux GIT Repositories - rc-scripts.git/commitdiff
- fix regex for newer iproute2, fixes no connectivity bug
authorMarcin Krol <hawk@tld-linux.org>
Mon, 9 Sep 2019 22:46:57 +0000 (22:46 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 9 Sep 2019 22:46:57 +0000 (22:46 +0000)
lib/functions.network

index d151b04ecc567879b896fea3eaae1cb4dd6fd9e0..862d42b14d6f93f7843695d86dac5b67d99eb4b2 100644 (file)
@@ -484,7 +484,7 @@ setup_ip_rules ()
                                /sbin/ip rule add $args $prio
                        done
                elif is_no "$1"; then
-                       LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local|253|254|255) \$" -e " map-to " | while read prio from src args; do
+                       LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local|253|254|255)[[:space:]]*\$" -e " map-to " | while read prio from src args; do
                                [ "$src" = "all" ] && /sbin/ip rule delete $args || /sbin/ip rule delete $from $src $args
                        done
                fi
@@ -503,7 +503,7 @@ setup_ip_rules ()
                                /sbin/ip -6 rule add $args $prio
                        done
                elif is_no "$1"; then
-                       LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local|253|254|255) \$" -e " map-to " | while read prio from src args; do
+                       LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local|253|254|255)[[:space:]]*\$" -e " map-to " | while read prio from src args; do
                                [ "$src" = "all" ] && /sbin/ip -6 rule delete $args || /sbin/ip -6 rule delete $from $src $args
                        done
                fi