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
This commit is contained in:
parent
ea0a01d7e2
commit
c62b07b2ce
3 changed files with 14 additions and 3 deletions
|
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=ppp
|
PKG_NAME:=ppp
|
||||||
PKG_VERSION:=2.4.7
|
PKG_VERSION:=2.4.7
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
|
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
|
||||||
|
|
|
@ -19,3 +19,12 @@ proto_send_update "$PPP_IPPARAM"
|
||||||
[ -x "$SCRIPT" ] && "$SCRIPT" "$@"
|
[ -x "$SCRIPT" ] && "$SCRIPT" "$@"
|
||||||
done
|
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
|
||||||
|
|
|
@ -16,7 +16,7 @@ ppp_generic_init_config() {
|
||||||
proto_config_add_string pppd_options
|
proto_config_add_string pppd_options
|
||||||
proto_config_add_string 'connect:file'
|
proto_config_add_string 'connect:file'
|
||||||
proto_config_add_string 'disconnect:file'
|
proto_config_add_string 'disconnect:file'
|
||||||
proto_config_add_boolean ipv6
|
proto_config_add_string ipv6
|
||||||
proto_config_add_boolean authfail
|
proto_config_add_boolean authfail
|
||||||
proto_config_add_int mtu
|
proto_config_add_int mtu
|
||||||
proto_config_add_string pppname
|
proto_config_add_string pppname
|
||||||
|
@ -28,9 +28,11 @@ ppp_generic_setup() {
|
||||||
json_get_vars ipv6 demand keepalive username password pppd_options pppname
|
json_get_vars ipv6 demand keepalive username password pppd_options pppname
|
||||||
if [ "$ipv6" = 0 ]; then
|
if [ "$ipv6" = 0 ]; then
|
||||||
ipv6=""
|
ipv6=""
|
||||||
else
|
elif [ -z "$ipv6" -o "$ipv6" = auto ]; then
|
||||||
ipv6=1
|
ipv6=1
|
||||||
|
proto_export "IPV6IFACE=${config}6"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${demand:-0}" -gt 0 ]; then
|
if [ "${demand:-0}" -gt 0 ]; then
|
||||||
demand="precompiled-active-filter /etc/ppp/filter demand idle $demand"
|
demand="precompiled-active-filter /etc/ppp/filter demand idle $demand"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue