summaryrefslogtreecommitdiffstats
path: root/package/network/services/ppp/files/lib/netifd/ppp-up
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2014-10-08 20:37:15 +0000
committerSteven Barth <cyrus@openwrt.org>2014-10-08 20:37:15 +0000
commitc62b07b2ce55b16c976a1b87ca80a39c1127d612 (patch)
treeaf1dbe03bd25d8d15ce1c705b8d3aaaef965ea8a /package/network/services/ppp/files/lib/netifd/ppp-up
parentea0a01d7e20b407721742b4e4a7efbc258aab7a5 (diff)
downloadmaster-31e0f0ae-c62b07b2ce55b16c976a1b87ca80a39c1127d612.tar.gz
master-31e0f0ae-c62b07b2ce55b16c976a1b87ca80a39c1127d612.tar.bz2
master-31e0f0ae-c62b07b2ce55b16c976a1b87ca80a39c1127d612.zip
ppp: allow auto-detecting and creation of ipv6 subinterface
this makes ipv6 with ppp a bit more comfortable Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 42854
Diffstat (limited to 'package/network/services/ppp/files/lib/netifd/ppp-up')
-rwxr-xr-xpackage/network/services/ppp/files/lib/netifd/ppp-up9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/network/services/ppp/files/lib/netifd/ppp-up b/package/network/services/ppp/files/lib/netifd/ppp-up
index fa14550ec4..286fc5f834 100755
--- a/package/network/services/ppp/files/lib/netifd/ppp-up
+++ b/package/network/services/ppp/files/lib/netifd/ppp-up
@@ -19,3 +19,12 @@ proto_send_update "$PPP_IPPARAM"
[ -x "$SCRIPT" ] && "$SCRIPT" "$@"
done
}
+
+if [ -n "$IPV6IFACE" -a "$(ifstatus $IPV6IFACE | jsonfilter -e @.device)" != "$IFNAME" ]; then
+ json_init
+ json_add_string name "${PPP_IPPARAM}_dhcpv6"
+ json_add_string ifname "@$PPP_IPPARAM"
+ json_add_string proto "dhcpv6"
+ json_close_object
+ ubus call network add_dynamic "$(json_dump)"
+fi