diff options
author | cyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-12-15 19:38:53 +0000 |
---|---|---|
committer | cyrus <cyrus@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-12-15 19:38:53 +0000 |
commit | 1552fd49b45ce917123680665ea186f5b226f36b (patch) | |
tree | 71e06ac05f12023cb29ec48d190713e88c84f85a /package/network/ipv6/odhcp6c | |
parent | bee1b0f3a58df09f9c4eb7cabc742c3c21cef05f (diff) |
Convert DHCP->6rd and DHCPv6->DS-Lite autoconfig to dynamic interface
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39061 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/ipv6/odhcp6c')
-rwxr-xr-x | package/network/ipv6/odhcp6c/files/dhcpv6.script | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index 1d5f521e45..8bcf76681c 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -78,17 +78,14 @@ setup_interface () { proto_send_update "$INTERFACE" if [ -n "$AFTR_IP " -a -n "$IFACE_DSLITE" ]; then -uci -q batch <<-EOF >/dev/null -set network.$IFACE_DSLITE.proto=dslite -set network.$IFACE_DSLITE.auto=0 -set network.$IFACE_DSLITE.peeraddr=$AFTR_IP -set network.$IFACE_DSLITE.tunlink=$INTERFACE -commit network -EOF - - ifdown "$IFACE_DSLITE" - /etc/init.d/network reload - ifup "$IFACE_DSLITE" + json_init + json_add_string name "$IFACE_DSLITE" + json_add_string ifname "@$INTERFACE" + json_add_string proto "dslite" + json_add_string peeraddr "$AFTR_IP" + json_add_string tunlink "$INTERFACE" + json_close_object + ubus call network add_dynamic "$(json_dump)" fi # TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN |