netifd: pass on delegate flag from dhcp to 6rd
SVN-Revision: 39909
This commit is contained in:
parent
7baf4957cf
commit
edd75e332c
@ -1,7 +1,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=netifd
|
PKG_NAME:=netifd
|
||||||
PKG_VERSION:=2014-03-11
|
PKG_VERSION:=2014-03-13
|
||||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
|
@ -53,6 +53,7 @@ setup_interface () {
|
|||||||
json_add_string ip6prefix "$ip6rdprefix"
|
json_add_string ip6prefix "$ip6rdprefix"
|
||||||
json_add_int ip6prefixlen "$ip6rdprefixlen"
|
json_add_int ip6prefixlen "$ip6rdprefixlen"
|
||||||
json_add_string tunlink "$INTERFACE"
|
json_add_string tunlink "$INTERFACE"
|
||||||
|
[ -n "$IFACE6RD_DELEGATE" ] && json_add_boolean delegate "$IFACE6RD_DELEGATE"
|
||||||
json_close_object
|
json_close_object
|
||||||
|
|
||||||
ubus call network add_dynamic "$(json_dump)"
|
ubus call network add_dynamic "$(json_dump)"
|
||||||
|
@ -14,14 +14,15 @@ proto_dhcp_init_config() {
|
|||||||
proto_config_add_string 'reqopts:list(string)'
|
proto_config_add_string 'reqopts:list(string)'
|
||||||
proto_config_add_string iface6rd
|
proto_config_add_string iface6rd
|
||||||
proto_config_add_string sendopts
|
proto_config_add_string sendopts
|
||||||
|
proto_config_add_boolean delegate
|
||||||
}
|
}
|
||||||
|
|
||||||
proto_dhcp_setup() {
|
proto_dhcp_setup() {
|
||||||
local config="$1"
|
local config="$1"
|
||||||
local iface="$2"
|
local iface="$2"
|
||||||
|
|
||||||
local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts
|
local ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate
|
||||||
json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts
|
json_get_vars ipaddr hostname clientid vendorid broadcast reqopts iface6rd sendopts delegate
|
||||||
|
|
||||||
local opt dhcpopts
|
local opt dhcpopts
|
||||||
for opt in $reqopts; do
|
for opt in $reqopts; do
|
||||||
@ -35,6 +36,7 @@ proto_dhcp_setup() {
|
|||||||
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
|
[ "$broadcast" = 1 ] && broadcast="-B" || broadcast=
|
||||||
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
|
[ -n "$clientid" ] && clientid="-x 0x3d:${clientid//:/}" || clientid="-C"
|
||||||
[ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
|
[ -n "$iface6rd" ] && proto_export "IFACE6RD=$iface6rd"
|
||||||
|
[ "$delegate" = "0" ] && proto_export "IFACE6RD_DELEGATE=0"
|
||||||
|
|
||||||
proto_export "INTERFACE=$config"
|
proto_export "INTERFACE=$config"
|
||||||
proto_run_command "$config" udhcpc \
|
proto_run_command "$config" udhcpc \
|
||||||
|
Loading…
Reference in New Issue
Block a user