X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fipsec%2Fesp_outb.c;h=5a5429a12b824d0100f96d4b8f44232fbf55ab09;hb=3d171da6e700901a82bfdbf676a82c299ef50f38;hp=b7a70fd001863a378e03bf540734445d829f89d9;hpb=ff4a29d167460ec1ac5cfacf965fd78181f8fa9a;p=dpdk.git diff --git a/lib/ipsec/esp_outb.c b/lib/ipsec/esp_outb.c index b7a70fd001..5a5429a12b 100644 --- a/lib/ipsec/esp_outb.c +++ b/lib/ipsec/esp_outb.c @@ -4,7 +4,6 @@ #include #include -#include #include #include #include @@ -197,7 +196,7 @@ outb_tun_pkt_prepare(struct rte_ipsec_sa *sa, rte_be64_t sqc, /* if UDP encap is enabled update the dgram_len */ if (sa->type & RTE_IPSEC_SATP_NATT_ENABLE) { struct rte_udp_hdr *udph = (struct rte_udp_hdr *) - (ph - sizeof(struct rte_udp_hdr)); + (ph + sa->hdr_len - sizeof(struct rte_udp_hdr)); udph->dgram_len = rte_cpu_to_be_16(mb->pkt_len - sqh_len - sa->hdr_l3_off - sa->hdr_len); } @@ -614,7 +613,7 @@ cpu_outb_trs_pkt_prepare(const struct rte_ipsec_session *ss, /* * process outbound packets for SA with ESN support, - * for algorithms that require SQN.hibits to be implictly included + * for algorithms that require SQN.hibits to be implicitly included * into digest computation. * In that case we have to move ICV bytes back to their proper place. */