aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/ipv6
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-08-09 17:56:19 +0200
committerHans Dedecker <dedeckeh@gmail.com>2018-08-09 18:46:57 +0200
commit2e02fdb3637c7a0320d230a3232d61e874c1e4d1 (patch)
treeda3a9f19dfef85e5594881e4f433b610a5539ac8 /package/network/ipv6
parent65556127832c6b9c87a8b97ca2f937b799088c87 (diff)
downloadupstream-2e02fdb3637c7a0320d230a3232d61e874c1e4d1.tar.gz
upstream-2e02fdb3637c7a0320d230a3232d61e874c1e4d1.tar.bz2
upstream-2e02fdb3637c7a0320d230a3232d61e874c1e4d1.zip
odhcp6c: apply IPv6/ND configuration earlier
Apply IPv6/ND configuration before proto_send_update so that all config info is available when netifd is handling the notify_proto ubus call. In particular this fixes an issue when netifd is updating the downstream IPv6 mtu as netifd was still using the not yet updated upstream IPv6 mtu to set the downstream IPv6 mtu Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package/network/ipv6')
-rw-r--r--package/network/ipv6/odhcp6c/Makefile2
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.script15
2 files changed, 9 insertions, 8 deletions
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
index 7f5f745fb8..451f0962bb 100644
--- a/package/network/ipv6/odhcp6c/Makefile
+++ b/package/network/ipv6/odhcp6c/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcp6c
-PKG_RELEASE:=14
+PKG_RELEASE:=15
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index dcb7a95d98..28955a358f 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
@@ -7,6 +7,14 @@ setup_interface () {
local device="$1"
local prefsig=""
local addrsig=""
+
+ # 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" -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
+
proto_init_update "*" 1
# Merge RA-DNS
@@ -203,13 +211,6 @@ setup_interface () {
ubus call network add_dynamic "$(json_dump)"
fi
- # 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" -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
-
# TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN
}