aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-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
commita7fda91e060dcbc144ad834b287f67604e3c0bb6 (patch)
tree75e5ed0b46152b3c84edd5e0030a83d5a4c4e7f5 /package/base-files
parentfe638dc0ed3b24a5a93df351ad08a569c5da70b4 (diff)
downloadmaster-187ad058-a7fda91e060dcbc144ad834b287f67604e3c0bb6.tar.gz
master-187ad058-a7fda91e060dcbc144ad834b287f67604e3c0bb6.tar.bz2
master-187ad058-a7fda91e060dcbc144ad834b287f67604e3c0bb6.zip
[package] base-files: add "mtu" option for route sections, allows setting per-route mtu values
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22003 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/Makefile2
-rw-r--r--package/base-files/files/etc/hotplug.d/iface/10-routes8
2 files changed, 7 insertions, 3 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 87e083edde..24bbf188c3 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=base-files
-PKG_RELEASE:=49
+PKG_RELEASE:=50
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
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