ppp: honor ip6table for IPv6 PPP interfaces
authorUlrich Weber <ulrich.weber@riverbed.com>
Fri, 10 Feb 2017 13:28:09 +0000 (14:28 +0100)
committerHans Dedecker <hans.dedecker@technicolor.com>
Mon, 13 Feb 2017 17:48:33 +0000 (18:48 +0100)
as we do for IPv4 PPP interfaces. When we create the
dynamic IPv6 interface we should inherit ip6table from
main interface.

Signed-off-by: Ulrich Weber <ulrich.weber@riverbed.com>
package/network/services/ppp/files/lib/netifd/ppp6-up
package/network/services/ppp/files/ppp.sh

index 87ca63c7518e7affae4f8a53b91f40e66ef87395..07b6a43ca5c4cbe29f905d057cdb585511968d8f 100644 (file)
@@ -22,6 +22,7 @@ if [ -n "$AUTOIPV6" ]; then
        json_add_string ifname "@$PPP_IPPARAM"
        json_add_string proto "dhcpv6"
        [ -n "$EXTENDPREFIX" ] && json_add_string extendprefix 1
        json_add_string ifname "@$PPP_IPPARAM"
        json_add_string proto "dhcpv6"
        [ -n "$EXTENDPREFIX" ] && json_add_string extendprefix 1
+       [ -n "$IP6TABLE" ] && json_add_string ip6table $IP6TABLE
        json_close_object
        ubus call network add_dynamic "$(json_dump)"
 fi
        json_close_object
        ubus call network add_dynamic "$(json_dump)"
 fi
index 91452b4288aa5b3f5aa1fd8b9af77e6dd122c592..9c27b3c280b5680cd56f3d8b18437e5d6e3b0c4d 100755 (executable)
@@ -88,7 +88,7 @@ ppp_generic_setup() {
        local config="$1"; shift
        local localip
 
        local config="$1"; shift
        local localip
 
-       json_get_vars ipv6 demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered persist maxfail holdoff
+       json_get_vars ipv6 ip6table demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered persist maxfail holdoff
        if [ "$ipv6" = 0 ]; then
                ipv6=""
        elif [ -z "$ipv6" -o "$ipv6" = auto ]; then
        if [ "$ipv6" = 0 ]; then
                ipv6=""
        elif [ -z "$ipv6" -o "$ipv6" = auto ]; then
@@ -136,6 +136,7 @@ ppp_generic_setup() {
                ${lcp_failure:+lcp-echo-interval $lcp_interval lcp-echo-failure $lcp_failure $lcp_adaptive} \
                ${ipv6:++ipv6} \
                ${autoipv6:+set AUTOIPV6=1} \
                ${lcp_failure:+lcp-echo-interval $lcp_interval lcp-echo-failure $lcp_failure $lcp_adaptive} \
                ${ipv6:++ipv6} \
                ${autoipv6:+set AUTOIPV6=1} \
+               ${ip6table:+set IP6TABLE=$ip6table} \
                nodefaultroute \
                usepeerdns \
                $demand $persist maxfail $maxfail \
                nodefaultroute \
                usepeerdns \
                $demand $persist maxfail $maxfail \