From patchwork Wed Feb 14 13:58:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jo-Philipp Wich X-Patchwork-Id: 873368 X-Patchwork-Delegate: jow@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="i3E4XifK"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zhLzJ12x4z9t3C for ; Thu, 15 Feb 2018 01:15:40 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=T7TdBfzZYb6HlEY1xk1dPCUk1wANZV48HyY+AuapWOo=; b=i3E4XifKZ/P4SJ pMYho2f3Ez08tM7ZTrddgc+kBL7SpYAhJJf+Hvex0FfKkXJRtHrS46O1ajBr+ooQsUYXTVbzy1lhn lofP83K+efmhgu6SmrkR52CXLwJe2zrAympipJ6zDspsssmTpZ5YYUHJ6EVkTycEYUOXQCakE0Iq4 wYlXc13QQLceObo6on1l5NhG6NtdsI2ZqP+B6z+dtfRSsREoIEKjWUOrnhMz35nPS+e3IWwjWkqFG 38RksLrEFOECMyzAsozsPSldlRHADSGJLVc0qi7MsjxWjD9Dgo9jqn94rp7rZ+SY315bCHlsjRtMI Zdkb6VoK6iSBM12tDcGA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1elxqR-0000x0-T9; Wed, 14 Feb 2018 14:15:35 +0000 Received: from mxout01.bytecamp.net ([212.204.60.217]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1elxk5-00021V-2R for lede-dev@lists.infradead.org; Wed, 14 Feb 2018 14:09:14 +0000 Received: by mxout01.bytecamp.net (Postfix, from userid 1001) id A2899575928; Wed, 14 Feb 2018 14:58:25 +0100 (CET) Received: from mail.bytecamp.net (mail.bytecamp.net [212.204.60.9]) by mxout01.bytecamp.net (Postfix) with ESMTP id 88181575923 for ; Wed, 14 Feb 2018 14:58:24 +0100 (CET) Received: (qmail 92240 invoked from network); 14 Feb 2018 14:58:24 +0100 Received: from unknown (HELO localhost.localdomain) (jo%wwsnet.net@213.61.250.146) by mail.bytecamp.net with ESMTPS (DHE-RSA-AES128-GCM-SHA256 encrypted); 14 Feb 2018 14:58:24 +0100 From: Jo-Philipp Wich To: lede-dev@lists.infradead.org, Hans Dedecker Date: Wed, 14 Feb 2018 14:58:07 +0100 Message-Id: <20180214135808.28756-1-jo@mein.io> X-Mailer: git-send-email 2.15.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180214_060902_287782_577453C4 X-CRM114-Status: UNSURE ( 9.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.6 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.204.60.217 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 2.0 LONGWORDS Long string of long words Subject: [LEDE-DEV] [RFC PATCH 1/2] odhcp6c: support multiple additional user prefixes X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jo-Philipp Wich MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Support configuration in the form... list ip6prefix 2001:db8:1234::/64 list ip6prefix 2001:db8:5678::/64 ... to allow specifying multiple additional IPv6 prefixes. Implements feature request FS#1361. Signed-off-by: Jo-Philipp Wich Acked-by: Hans Dedecker --- package/network/ipv6/odhcp6c/Makefile | 2 +- package/network/ipv6/odhcp6c/files/dhcpv6.script | 4 +++- package/network/ipv6/odhcp6c/files/dhcpv6.sh | 13 +++++++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 9989f80f1a..8abb63317f 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c -PKG_RELEASE:=8 +PKG_RELEASE:=9 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index 03efaf7211..3171013966 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -48,7 +48,9 @@ setup_interface () { fi done - [ -n "$USERPREFIX" ] && proto_add_ipv6_prefix "$USERPREFIX" + for prefix in $USERPREFIX; do + proto_add_ipv6_prefix "$prefix" + done # Merge addresses for entry in $RA_ADDRESSES; do diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index 5c2ee6b988..54e51065f6 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -16,7 +16,7 @@ proto_dhcpv6_init_config() { proto_config_add_string 'forceprefix:bool' proto_config_add_string 'extendprefix:bool' proto_config_add_string 'norelease:bool' - proto_config_add_string 'ip6prefix:ip6addr' + proto_config_add_array 'ip6prefix:list(ip6addr)' proto_config_add_string iface_dslite proto_config_add_string zone_dslite proto_config_add_string iface_map @@ -36,12 +36,17 @@ proto_dhcpv6_init_config() { proto_config_add_int "ra_holdoff" } +proto_dhcpv6_add_prefix() { + append "$3" "$1" +} + proto_dhcpv6_setup() { local config="$1" local iface="$2" - local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff - json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff + local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease ip6prefix ip6prefixes iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff + json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff + json_for_each_item proto_dhcpv6_add_prefix ip6prefix ip6prefixes # Configure local opts="" @@ -84,7 +89,7 @@ proto_dhcpv6_setup() { append opts "-t${soltimeout:-120}" - [ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix" + [ -n "$ip6prefixes" ] && proto_export "USERPREFIX=$ip6prefixes" [ -n "$iface_dslite" ] && proto_export "IFACE_DSLITE=$iface_dslite" [ -n "$iface_map" ] && proto_export "IFACE_MAP=$iface_map" [ -n "$iface_464xlat" ] && proto_export "IFACE_464XLAT=$iface_464xlat" From patchwork Wed Feb 14 13:58:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jo-Philipp Wich X-Patchwork-Id: 873367 X-Patchwork-Delegate: jow@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n/NhJkmI"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zhLyh0lV5z9t3C for ; Thu, 15 Feb 2018 01:15:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=md992z3YNgKWnlHNPJYAocZflZeS/+2eMNdh1FULNdk=; b=n/NhJkmIqYUIFS gldeqsy1LWU1T2lX7vsd6dVubpPhkOc5RFtZbyU+Rnyi4aUZt+U9JONeII9IbtT7x8z1bV0D/kHfU lPw9l4u+pV7WVMORcOBhFE6ADxA2Cil4kWS7YURRW6ixzejNDRn9HAINbN2hWwm/fOLCWEV2aklGD CXk0NJSnNtqVLghPVTX6Gin+k+hSiFhfF/gXPWbhU0SvO4GE7f+uVO7C5iReqB4TJhQz35pFhKw5z B+h8LJlP4GG/D+yKbtZqfZhGGUwQteHrdCBvejhkraxXFazOeVJL2mthxxxoRLGSxIcmpH9lmedvv CQnZCSrrw/p6SSYFlhEQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1elxpv-0007h4-78; Wed, 14 Feb 2018 14:15:03 +0000 Received: from mxout01.bytecamp.net ([212.204.60.217]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1elxk5-00021Q-3r for lede-dev@lists.infradead.org; Wed, 14 Feb 2018 14:09:11 +0000 Received: by mxout01.bytecamp.net (Postfix, from userid 1001) id 2872F575916; Wed, 14 Feb 2018 14:58:25 +0100 (CET) Received: from mail.bytecamp.net (mail.bytecamp.net [212.204.60.9]) by mxout01.bytecamp.net (Postfix) with ESMTP id E7DC7575913 for ; Wed, 14 Feb 2018 14:58:24 +0100 (CET) Received: (qmail 92247 invoked from network); 14 Feb 2018 14:58:24 +0100 Received: from unknown (HELO localhost.localdomain) (jo%wwsnet.net@213.61.250.146) by mail.bytecamp.net with ESMTPS (DHE-RSA-AES128-GCM-SHA256 encrypted); 14 Feb 2018 14:58:24 +0100 From: Jo-Philipp Wich To: lede-dev@lists.infradead.org, Hans Dedecker Date: Wed, 14 Feb 2018 14:58:08 +0100 Message-Id: <20180214135808.28756-2-jo@mein.io> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180214135808.28756-1-jo@mein.io> References: <20180214135808.28756-1-jo@mein.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180214_060901_994583_CE994090 X-CRM114-Status: GOOD ( 10.02 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [212.204.60.217 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [RFC PATCH 2/2] 6in4: support multiple additional user prefixes X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jo-Philipp Wich MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Support configuration in the form... list ip6prefix 2001:db8:1234::/64 list ip6prefix 2001:db8:5678::/64 ... to allow specifying multiple routed IPv6 prefixes. Implements feature request FS#1361. Signed-off-by: Jo-Philipp Wich Acked-by: Hans Dedecker --- package/network/ipv6/6in4/Makefile | 2 +- package/network/ipv6/6in4/files/6in4.sh | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package/network/ipv6/6in4/Makefile b/package/network/ipv6/6in4/Makefile index 34227ce9ef..8ff4730e74 100644 --- a/package/network/ipv6/6in4/Makefile +++ b/package/network/ipv6/6in4/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=6in4 -PKG_VERSION:=24 +PKG_VERSION:=25 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0 diff --git a/package/network/ipv6/6in4/files/6in4.sh b/package/network/ipv6/6in4/files/6in4.sh index 786f37fc14..941dc43d68 100755 --- a/package/network/ipv6/6in4/files/6in4.sh +++ b/package/network/ipv6/6in4/files/6in4.sh @@ -22,13 +22,18 @@ proto_6in4_update() { ' "$1" "$@" } +proto_6in4_add_prefix() { + append "$3" "$1" +} + proto_6in4_setup() { local cfg="$1" local iface="$2" local link="6in4-$cfg" - local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix tunlink tunnelid username password updatekey - json_get_vars mtu ttl tos ipaddr peeraddr ip6addr ip6prefix tunlink tunnelid username password updatekey + local mtu ttl tos ipaddr peeraddr ip6addr ip6prefix ip6prefixes tunlink tunnelid username password updatekey + json_get_vars mtu ttl tos ipaddr peeraddr ip6addr tunlink tunnelid username password updatekey + json_for_each_item proto_6in4_add_prefix ip6prefix ip6prefixes [ -z "$peeraddr" ] && { proto_notify_error "$cfg" "MISSING_ADDRESS" @@ -61,10 +66,10 @@ proto_6in4_setup() { proto_add_ipv6_route "::" 0 "" "" "" "$local6/$mask6" } - [ -n "$ip6prefix" ] && { + for ip6prefix in $ip6prefixes; do proto_add_ipv6_prefix "$ip6prefix" proto_add_ipv6_route "::" 0 "" "" "" "$ip6prefix" - } + done proto_add_tunnel json_add_string mode sit @@ -122,7 +127,7 @@ proto_6in4_init_config() { proto_config_add_string "ipaddr" proto_config_add_string "ip6addr" - proto_config_add_string "ip6prefix" + proto_config_add_array "ip6prefix" proto_config_add_string "peeraddr" proto_config_add_string "tunlink" proto_config_add_string "tunnelid"