aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/iproute2.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 20873464..1cd4f420 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -141,6 +141,7 @@ _add_address()
;;
esac
+ veinfo ip addr add "$@" dev "${IFACE}"
ip addr add "$@" dev "${IFACE}"
}
@@ -180,6 +181,7 @@ _add_route()
cmd="${cmd} metric ${metric}"
fi
+ veinfo ip ${family} route append ${cmd} dev "${IFACE}"
ip ${family} route append ${cmd} dev "${IFACE}"
eend $?
}
@@ -215,19 +217,19 @@ _ip_rule_runner() {
local cmd rules OIFS="${IFS}"
cmd="$1"
rules="$2"
- eindent
+ veindent
local IFS="$__IFS"
for ru in $rules ; do
unset IFS
ruN="$(trim "${ru}")"
[ -z "${ruN}" ] && continue
- ebegin "${cmd} ${ruN}"
+ vebegin "${cmd} ${ruN}"
ip rule ${cmd} ${ru}
- eend $?
+ veend $?
local IFS="$__IFS"
done
IFS="${OIFS}"
- eoutdent
+ veoutdent
}
iproute2_pre_start()
@@ -277,6 +279,7 @@ iproute2_post_start()
eerror "IP Policy Routing (CONFIG_IP_MULTIPLE_TABLES) needed for ip rule"
else
service_set_value "ip_rule" "${rules}"
+ einfo "Adding RPDB rules"
_ip_rule_runner add "${rules}"
fi
fi
@@ -302,7 +305,10 @@ iproute2_post_stop()
# Kernel may not have IP built in
if [ -e /proc/net/route ]; then
local rules="$(service_get_value "ip_rule")"
- [ -n "${rules}" ] && _ip_rule_runner del "${rules}"
+ if [ -n "${rules}" ]; then
+ einfo "Removing RPDB rules"
+ _ip_rule_runner del "${rules}"
+ fi
ip route flush table cache dev "${IFACE}"
fi