aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-03-20 18:48:59 +0000
committerJohn Crispin <blogic@openwrt.org>2016-03-20 18:48:59 +0000
commitbe035a2aba2da2017e9be75da01ba1658d258e85 (patch)
tree5e1df6cb90b6a6137e479dc545cbe1da97ceeae6 /package/network
parenta764ba10942e26e8468677581fac77f30b73715a (diff)
downloadmaster-187ad058-be035a2aba2da2017e9be75da01ba1658d258e85.tar.gz
master-187ad058-be035a2aba2da2017e9be75da01ba1658d258e85.tar.bz2
master-187ad058-be035a2aba2da2017e9be75da01ba1658d258e85.zip
odhcp6c : Silence mtu write error warnings
Silence warning "daemon.notice netifd: wan6 (1139): sh: write error: Invalid argument" when an invalid MTU is received via RA as kernel refuses to accept IPv6 mtu values which are smaller than 1280 and bigger than the device mtu. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49054 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network')
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.script2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index c307d09580..46980cb57d 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
@@ -185,7 +185,7 @@ setup_interface () {
# Apply IPv6 / ND configuration
HOPLIMIT=$(cat /proc/sys/net/ipv6/conf/$device/hop_limit)
[ -n "$RA_HOPLIMIT" -a -n "$HOPLIMIT" ] && [ "$RA_HOPLIMIT" -gt "$HOPLIMIT" ] && echo "$RA_HOPLIMIT" > /proc/sys/net/ipv6/conf/$device/hop_limit
- [ -n "$RA_MTU" ] && [ "$RA_MTU" -gt 0 ] && echo "$RA_MTU" > /proc/sys/net/ipv6/conf/$device/mtu
+ [ -n "$RA_MTU" ] && [ "$RA_MTU" -ge 1280 ] && echo "$RA_MTU" > /proc/sys/net/ipv6/conf/$device/mtu 2>/dev/null
[ -n "$RA_REACHABLE" ] && [ "$RA_REACHABLE" -gt 0 ] && echo "$RA_REACHABLE" > /proc/sys/net/ipv6/neigh/$device/base_reachable_time_ms
[ -n "$RA_RETRANSMIT" ] && [ "$RA_RETRANSMIT" -gt 0 ] && echo "$RA_RETRANSMIT" > /proc/sys/net/ipv6/neigh/$device/retrans_time_ms