From patchwork Tue May 29 20:39:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Dedecker X-Patchwork-Id: 922369 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QBDuHSf+"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HQhzh9Yc"; 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 40wQZn4r4Mz9s0q for ; Wed, 30 May 2018 06:40:01 +1000 (AEST) 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=9rZy/d29aNm1qBJM90NUh2VZeiiqhme21/thJBVRO04=; b=QBDuHSf+Odqcxu ZpdGDllqESm7y6DTEjCduwQnSzs4JyaCXjzjNcM4kMAIU24ve8W7SdpPHoMUcDvOuZTgdNHv7ZsPD ncehSG8Ce/jUJM/tPI5TKshDgfosj0pQlnnAsrxaJSatNgvAuU8dely2j6LwDDUrWvvEUz4XTOQ54 tviPnQD0AYLyB0IJTvPnG1DVJKrQhaUT8jGFdRoz3Iug8ZaH7x9Nekcalqwvzx4aH9SzgITORNP0l UMNF6nOwJtz7Y53o51Xzt5h4I01p2X1B0U0/gw8SMVeO562uidNMqRCLSBsU8X7JsWjV+fe7e2Sn6 QO++0mukVUFydJ9mU2/A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNlPF-0007yR-Vw; Tue, 29 May 2018 20:39:46 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNlPC-0007x8-BG for openwrt-devel@lists.openwrt.org; Tue, 29 May 2018 20:39:43 +0000 Received: by mail-wm0-x244.google.com with SMTP id f6-v6so43805322wmc.4 for ; Tue, 29 May 2018 13:39:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=mZQXvPABsDJtTOj/bQ82ASIICR8nxOUZUcxfEJEPizQ=; b=HQhzh9YcCM26UQyAITwfvaiYzGsk7F9IwOw/1yy833UVSgFyfuwYlEpNKzze1dbTCE 7l5BFzGY4K2ixCmf+LnacoGRPlsQ1VorphDa8hP2APEiEPg9PK8eJ4+M8I+Dj8DvxGEi 5C3Zj6Z1vtm/foB7uGo45WBpl9nuwxOEXlaT9CPpChx0EwBN17K5F6240qa2xcLuXc9y ClytaA0Jnxj+OfTBYxMjfGoZ+bIZqzhd801xer19dO2yxlxCGZtQT4F1uin8Wf8qHNJi LJl8sZpJUxvQTpxVO8cqYmkgWb8FXKPyRmjm6ZX8j5u5CYD2ULZgZXzzHYvw0dcZW8hX VWCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=mZQXvPABsDJtTOj/bQ82ASIICR8nxOUZUcxfEJEPizQ=; b=IXgGuyXdIjzyl2GDfAAPB8CRQALKrTTjSGby5r5mLxGhHOqfvgph34OhYoGdxO1Apv 3elbcIt8SIWIiE5i564JqdW9y8SQ9l+VrNdAeIEb4DPcZrqzZqusRXmhnxJmBSte9aPG XI1wtnkNHTEQfE+1fK8DHahG0Dp6Tka8fC8ihOKC1/SCmadn1pb/8V4L4jC180L/g2px zPN63P4fQiPMSDw5se3yMAHDNb+hjm9IkuqpQ4zN2E+HVUFWnIyHeD8TJ7v1U2gRL+cp FEkX4iW4WgxHajiS/Udv7WKSQ0Esc0CouLtxmZonmeJunqac2C7YhHNt0P+5QAhPPsqx eFaw== X-Gm-Message-State: ALKqPwd2XwEySkRN/3vTg3QgTiGG3rwtIv8+D7c8Mz3NzPOR9F+w8qJW RZHce/HsWcBgcufQFwludWDIBA== X-Google-Smtp-Source: ADUXVKKoA3tafjOj2gAvu4XreUg8GbY3vhU5fKnX/lRuA7TEMtc3gmMQ7aYvRplQ3ZUkl9hNPIgfAQ== X-Received: by 2002:aa7:c6d0:: with SMTP id b16-v6mr368671eds.302.1527626370048; Tue, 29 May 2018 13:39:30 -0700 (PDT) Received: from linux-5g1g.lan (ptr-fvl7vteb6vjd542m2s0.18120a2.ip6.access.telenet.be. [2a02:1812:1128:fb00:ffc7:aef4:4f01:1990]) by smtp.gmail.com with ESMTPSA id q30-v6sm18170053edc.93.2018.05.29.13.39.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 13:39:29 -0700 (PDT) From: Hans Dedecker To: openwrt-devel@lists.openwrt.org Date: Tue, 29 May 2018 22:39:24 +0200 Message-Id: <20180529203925.435-1-dedeckeh@gmail.com> X-Mailer: git-send-email 2.16.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180529_133942_392325_568B9EA1 X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:244 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dedeckeh[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Subject: [OpenWrt-Devel] [PATCH 1/2] ds-lite: make tunnel encapsulation limit support configurable (FS#1501) X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans Dedecker MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Be compatible with ISPs which don't support the destination option header containing the tunnel encapsulation limit as reported in FS#1501. Setting the uci parameter encaplimit to ignore; allows to disable the insertion of the destination option header in the ds-lite packets. Otherwise the tunnel encapsulation limit value can be set to a value from 0 till 255 by setting the encaplimit_dslite uci parameter accordingly. If no encaplimit value is specified the default value is 4 as before. Signed-off-by: Hans Dedecker --- package/network/ipv6/ds-lite/Makefile | 2 +- package/network/ipv6/ds-lite/files/dslite.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) mode change 100755 => 100644 package/network/ipv6/ds-lite/files/dslite.sh diff --git a/package/network/ipv6/ds-lite/Makefile b/package/network/ipv6/ds-lite/Makefile index 58e7156b95..4393d35877 100644 --- a/package/network/ipv6/ds-lite/Makefile +++ b/package/network/ipv6/ds-lite/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ds-lite PKG_VERSION:=7 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/network/ipv6/ds-lite/files/dslite.sh b/package/network/ipv6/ds-lite/files/dslite.sh old mode 100755 new mode 100644 index 2485a424dc..e9a0544690 --- a/package/network/ipv6/ds-lite/files/dslite.sh +++ b/package/network/ipv6/ds-lite/files/dslite.sh @@ -15,8 +15,8 @@ proto_dslite_setup() { local link="ds-$cfg" local remoteip6 - local mtu ttl peeraddr ip6addr tunlink zone weakif - json_get_vars mtu ttl peeraddr ip6addr tunlink zone weakif + local mtu ttl peeraddr ip6addr tunlink zone weakif encaplimit + json_get_vars mtu ttl peeraddr ip6addr tunlink zone weakif encaplimit [ -z "$peeraddr" ] && { proto_notify_error "$cfg" "MISSING_ADDRESS" @@ -68,6 +68,9 @@ proto_dslite_setup() { json_add_string local "$ip6addr" json_add_string remote "$peeraddr" [ -n "$tunlink" ] && json_add_string link "$tunlink" + json_add_object 'data' + json_add_string encaplimit "${encaplimit:-4}" + json_close_object proto_close_tunnel proto_add_data @@ -97,6 +100,7 @@ proto_dslite_init_config() { proto_config_add_string "tunlink" proto_config_add_int "mtu" proto_config_add_int "ttl" + proto_config_add_string "encaplimit" proto_config_add_string "zone" proto_config_add_string "weakif" }