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/config/netifd | |
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/config/netifd')
-rw-r--r-- | package/network/config/netifd/Makefile | 2 | ||||
-rwxr-xr-x | package/network/config/netifd/files/lib/netifd/dhcp.script | 23 |
2 files changed, 12 insertions, 13 deletions
diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile index 5a110e9545..1650b58961 100644 --- a/package/network/config/netifd/Makefile +++ b/package/network/config/netifd/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=netifd -PKG_VERSION:=2013-12-14 +PKG_VERSION:=2013-12-14.1 PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_SOURCE_PROTO:=git diff --git a/package/network/config/netifd/files/lib/netifd/dhcp.script b/package/network/config/netifd/files/lib/netifd/dhcp.script index 50163da514..77b77f5fec 100755 --- a/package/network/config/netifd/files/lib/netifd/dhcp.script +++ b/package/network/config/netifd/files/lib/netifd/dhcp.script @@ -44,19 +44,18 @@ setup_interface () { ip6rd="${ip6rd#* }" local ip6rdbr="${ip6rd%% *}" -uci -q batch <<-EOF >/dev/null -set network.$IFACE6RD.proto=6rd -set network.$IFACE6RD.auto=0 -set network.$IFACE6RD.peeraddr=$ip6rdbr -set network.$IFACE6RD.ip4prefixlen=$v4mask -set network.$IFACE6RD.ip6prefix=$ip6rdprefix -set network.$IFACE6RD.ip6prefixlen=$ip6rdprefixlen -commit network -EOF + json_init + json_add_string name "$IFACE6RD" + json_add_string ifname "@$INTERFACE" + json_add_string proto "6rd" + json_add_string peeraddr "$ip6rdbr" + json_add_int ip4prefixlen "$v4mask" + json_add_string ip6prefix "$ip6rdprefix" + json_add_int ip6prefixlen "$ip6rdprefixlen" + json_add_string tunlink "$INTERFACE" + json_close_object - ifdown "$IFACE6RD" - /etc/init.d/network reload - ifup "$IFACE6RD" + ubus call network add_dynamic "$(json_dump)" fi # TODO |