2
0
forked from Ivasoft/openwrt

base-files: add "mtu" option for route sections, allows setting per-route mtu values

SVN-Revision: 22003
This commit is contained in:
Jo-Philipp Wich
2010-06-30 23:46:34 +00:00
parent d9e8e8b4ec
commit 506db2a57e
2 changed files with 7 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ add_route() {
config_get netmask "$config" netmask
config_get gateway "$config" gateway
config_get metric "$config" metric
config_get mtu "$config" mtu
# make sure there is a gateway and a target
[ -n "$target" ] || {
@@ -33,7 +34,8 @@ add_route() {
dest="${dest:--host "$target"}"
/sbin/route add $dest ${gateway:+gw "$gateway"} \
${dev:+dev "$dev"} ${metric:+ metric "$metric"}
${dev:+dev "$dev"} ${metric:+ metric "$metric"} \
${mtu:+mss "$mtu"}
}
add_route6() {
@@ -50,6 +52,7 @@ add_route6() {
config_get target "$config" target
config_get gateway "$config" gateway
config_get metric "$config" metric
config_get mtu "$config" mtu
# make sure there is a gateway and a target
[ -n "$target" ] || {
@@ -61,7 +64,8 @@ add_route6() {
}
/sbin/route -A inet6 add $target ${gateway:+gw "$gateway"} \
${dev:+dev "$dev"} ${metric:+ metric "$metric"}
${dev:+dev "$dev"} ${metric:+ metric "$metric"} \
${mtu:+mss "$mtu"}
}
case "$ACTION" in