X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=examples%2Fipsec-secgw%2Fipip.h;h=93393d527f2bb46c96b00f69e9b03ea3e96ecbd6;hb=47d9763a1dd3103d732da9eec350cfc1cd784717;hp=ff1dccdb8f6af8beae0daaf5bc8d088d2b1b0bd5;hpb=fdd2322bb45e83d3fd96b06ea32a4afbb60bcb6f;p=deb_dpdk.git diff --git a/examples/ipsec-secgw/ipip.h b/examples/ipsec-secgw/ipip.h index ff1dccdb..93393d52 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;