From 21e610d89da09c31ff36b575dea6ddb20988e1db Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 9 Sep 2019 22:46:57 +0000 Subject: [PATCH] - fix regex for newer iproute2, fixes no connectivity bug --- lib/functions.network | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/functions.network b/lib/functions.network index d151b04..862d42b 100644 --- a/lib/functions.network +++ b/lib/functions.network @@ -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 -- 2.46.0