aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-06-30 23:46:34 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-06-30 23:46:34 +0000
commit506db2a57ec56202966edf057371e621bd156da4 (patch)
tree5371612f1a0a97dd57fdbfe74af1f4d90ebc3a3b /package/base-files/files
parentd9e8e8b4ec955574027619b4cd7ba728d360bf86 (diff)
downloadupstream-506db2a57ec56202966edf057371e621bd156da4.tar.gz
upstream-506db2a57ec56202966edf057371e621bd156da4.tar.bz2
upstream-506db2a57ec56202966edf057371e621bd156da4.zip
base-files: add "mtu" option for route sections, allows setting per-route mtu values
SVN-Revision: 22003
Diffstat (limited to 'package/base-files/files')
-rw-r--r--package/base-files/files/etc/hotplug.d/iface/10-routes8
1 files changed, 6 insertions, 2 deletions
diff --git a/package/base-files/files/etc/hotplug.d/iface/10-routes b/package/base-files/files/etc/hotplug.d/iface/10-routes
index 14fb75eec2..3e0bebbbe3 100644
--- a/package/base-files/files/etc/hotplug.d/iface/10-routes
+++ b/package/base-files/files/etc/hotplug.d/iface/10-routes
@@ -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