SVN: rc-scripts/trunk/sysconfig/network-scripts/functions.network
jajcus
jajcus at pld-linux.org
Thu Apr 14 11:42:30 CEST 2011
Author: jajcus
Date: Thu Apr 14 11:42:29 2011
New Revision: 12228
Modified:
rc-scripts/trunk/sysconfig/network-scripts/functions.network
Log:
- make sure the default ip rules are preserved over network restart
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.
Modified: rc-scripts/trunk/sysconfig/network-scripts/functions.network
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/functions.network (original)
+++ rc-scripts/trunk/sysconfig/network-scripts/functions.network Thu Apr 14 11:42:29 2011
@@ -475,7 +475,7 @@
/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 @@
/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
More information about the pld-cvs-commit
mailing list