#include <rte_ipsec.h>
#include <rte_esp.h>
-#include <rte_ip.h>
#include <rte_udp.h>
#include <rte_errno.h>
#include <rte_cryptodev.h>
/* 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);
}
/*
* 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.
*/