When the GENEVE packet is processed, the offset is
not changed correctly. As a result, the inner packet
is incorrectly parsed. This patch fixes it.

Fixes: 64ed7f854cf4 ("net: add tunnel packet type parsing")
Cc: sta...@dpdk.org

Signed-off-by: Dengdui Huang <huangdeng...@huawei.com>
---
 lib/net/rte_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/net/rte_net.c b/lib/net/rte_net.c
index 67d57d5f04..cd8cc0d0c8 100644
--- a/lib/net/rte_net.c
+++ b/lib/net/rte_net.c
@@ -260,7 +260,7 @@ ptype_tunnel_with_udp(uint16_t *proto, const struct 
rte_mbuf *m,
                if (unlikely(gnh == NULL))
                        return 0;
                geneve_len = sizeof(*gnh) + gnh->opt_len * 4;
-               *off = geneve_len;
+               *off += geneve_len;
                hdr_lens->tunnel_len = geneve_len;
                *proto = gnh->proto;
                if (gnh->proto == 0)
-- 
2.33.0

Reply via email to