From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) by dpdk.org (Postfix) with ESMTP id 09B9C1B5E5 for ; Thu, 2 Nov 2017 13:03:30 +0100 (CET) Received: by mail-wr0-f170.google.com with SMTP id k62so4772304wrc.9 for ; Thu, 02 Nov 2017 05:03:30 -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:in-reply-to:references; bh=w1dJ+WAtoYS9l3L4qWGTZq8+bEbKE3aUscm0DsR9Yu4=; b=veFu7aIud0Awz8/kHqGan58T8Qqi92VKpcVRaLQS2qZ+v9mbs1sBAjroGWTH5vvWCY Wr+vdpoSFmh4GHL+xiBum1Toy4a7lKDd1S2fd28CMbdV5n41wos38YbgL7mJgzCi4gCw TF5a+Np7J2RY5hfuiIiPVIEgeaPcuQ50n/oKrlA/rruh57N207w6ppiskDoQVPaGKBPF Qu8wUHCTIaTLqb/Hc8KSCSxwZS4dt6ts1ctRNbNT5OptR5kg/xLBcbEcWqTyepgTbDZj D60SmrLElDBy04mH13SsZfc34Sa3pN3iKeZoEvHuZvlO1U6iI+52JgCHk6/IN2umPcu0 EgYw== 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:in-reply-to :references; bh=w1dJ+WAtoYS9l3L4qWGTZq8+bEbKE3aUscm0DsR9Yu4=; b=pFb3itUDLya7mTTi5ZCwPN40UWtH4J6GwW6cQqBFaPC5QnqRWSbnh6cIWJoxRci/rp GLULcKtoNuVosKoEdoAF05bHNx6D9HNAtKS+FZWlMJoIVuKnVMVqMVWBYe4jBXdTdALD cvmnuqwltuoZWsAkaDNuhsxx0NCB5/pLRxoRdSVwfo8vV4e0AL98kjq6S7QHlDRS3+be IiznqobP4BU8+L498hi4TO1Oecz+EVrYNlpYFumXfx+nMzjYoTK3ErkYZvQ1fLcWrwIM Wb79CUZm3ot/y3/s09uw+plRcvoK2nJjTwQlOtAZIyvGcxQaq6vb8QRfYa/Z/iDorJzs p49Q== X-Gm-Message-State: AMCzsaVVDBld6KfTPAUhZoQP6iCwl/6cC/Seqd1WAJKqUK52OfgQBstP UiQsa3OsohkgNtyE+SEuRzo= X-Google-Smtp-Source: ABhQp+Sw/2XVeuSO3jRSVG7WQ0n1fsmMpcAwr7pGZtuK+8EyUU26NvkX8Nwl640xB39ngZyOjoCAgw== X-Received: by 10.223.196.174 with SMTP id m43mr2931833wrf.7.1509624209751; Thu, 02 Nov 2017 05:03:29 -0700 (PDT) Received: from localhost ([2a00:23c5:bef3:400:4a51:b7ff:fe0b:4749]) by smtp.gmail.com with ESMTPSA id o3sm2415318wmg.3.2017.11.02.05.03.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Nov 2017 05:03:29 -0700 (PDT) From: luca.boccassi@gmail.com To: Tomasz Duszynski Cc: Sergio Gonzalez Monroy , dpdk stable Date: Thu, 2 Nov 2017 12:02:36 +0000 Message-Id: <20171102120247.10565-7-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171102120247.10565-1-luca.boccassi@gmail.com> References: <20171030153511.13322-1-luca.boccassi@gmail.com> <20171102120247.10565-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv6 payload length' has been queued to LTS release 16.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2017 12:03:30 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/04/17. So please shout if anyone has objections. Thanks. Kind regards, Luca Boccassi --- >>From 8978c2082e5cd1719af9695240fe38a5f62de410 Mon Sep 17 00:00:00 2001 From: Tomasz Duszynski Date: Fri, 13 Oct 2017 10:04:36 +0200 Subject: [PATCH] examples/ipsec-secgw: fix IPv6 payload length [ upstream commit b43a81319b2411bbdb96bd349cd3cdfd66714777 ] IPv6 payload length header field should contain only the number of bytes following the IPv6 header and not the entire packet size. Fixes: f159e70b0922 ("examples/ipsec-secgw: support transport mode") Fixes: 906257e965b7 ("examples/ipsec-secgw: support IPv6") Signed-off-by: Tomasz Duszynski Acked-by: Sergio Gonzalez Monroy --- examples/ipsec-secgw/esp.c | 6 ++++-- examples/ipsec-secgw/ipip.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/ipsec-secgw/esp.c b/examples/ipsec-secgw/esp.c index c5f30f7d9..1a2f07edb 100644 --- a/examples/ipsec-secgw/esp.c +++ b/examples/ipsec-secgw/esp.c @@ -199,7 +199,8 @@ esp_inbound_post(struct rte_mbuf *m, struct ipsec_sa *sa, /* XXX No option headers supported */ memmove(ip6, ip, sizeof(struct ip6_hdr)); ip6->ip6_nxt = *nexthdr; - ip6->ip6_plen = htons(rte_pktmbuf_data_len(m)); + ip6->ip6_plen = htons(rte_pktmbuf_data_len(m) - + sizeof(struct ip6_hdr)); } } else ipip_inbound(m, sizeof(struct esp_hdr) + sa->iv_len); @@ -301,7 +302,8 @@ esp_outbound(struct rte_mbuf *m, struct ipsec_sa *sa, } else { ip6 = (struct ip6_hdr *)new_ip; ip6->ip6_nxt = IPPROTO_ESP; - ip6->ip6_plen = htons(rte_pktmbuf_data_len(m)); + ip6->ip6_plen = htons(rte_pktmbuf_data_len(m) - + sizeof(struct ip6_hdr)); } } diff --git a/examples/ipsec-secgw/ipip.h b/examples/ipsec-secgw/ipip.h index ff1dccdb8..93393d527 100644 --- a/examples/ipsec-secgw/ipip.h +++ b/examples/ipsec-secgw/ipip.h @@ -72,7 +72,8 @@ ipip_outbound(struct rte_mbuf *m, uint32_t offset, uint32_t is_ipv6, /* Per RFC4301 5.1.2.1 */ outip6->ip6_flow = htonl(IP6_VERSION << 28 | ds_ecn << 20); - outip6->ip6_plen = htons(rte_pktmbuf_data_len(m)); + outip6->ip6_plen = htons(rte_pktmbuf_data_len(m) - + sizeof(struct ip6_hdr)); outip6->ip6_nxt = IPPROTO_ESP; outip6->ip6_hops = IPDEFTTL; -- 2.11.0