]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- make sure the default ip rules are preserved over network restart
authorJacek Konieczny <jajcus@pld-linux.org>
Thu, 14 Apr 2011 09:42:29 +0000 (09:42 +0000)
committerJacek Konieczny <jajcus@pld-linux.org>
Thu, 14 Apr 2011 09:42:29 +0000 (09:42 +0000)
  even if 'ip rule show' displays them using numeric table values.
  I have a system where 'from all lookup 255' is returned instead of
  'from all lookup local' for unknown reason, but it could also happen
  if /etc/iproute2/rt_tables file is missing or corrupted. And bad things
  happen (IPv4 not working) if the 'lookup local' rule is missing.

svn-id: @12228

sysconfig/network-scripts/functions.network

index 92684cd487e2451fe2a860e450607fe72cc3de7f..1215815731a3a388dfe3cc8754a27487f1bafba4 100644 (file)
@@ -475,7 +475,7 @@ setup_ip_rules ()
                                /sbin/ip rule add $args
                        done
                elif is_no "$1"; then
-                       LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local) \$" -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) \$" -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
@@ -487,7 +487,7 @@ setup_ip_rules ()
                                /sbin/ip -6 rule add $args
                        done
                elif is_no "$1"; then
-                       LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local) \$" -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) \$" -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
This page took 0.422025 seconds and 4 git commands to generate.