Skip to content

Commit

Permalink
Don't look for UDP header in second fragment and later.
Browse files Browse the repository at this point in the history
Change-Id: I724e58d9ecee113ee7627f9d4b2b52f0033c2d16
Partial-Bug:1664734
  • Loading branch information
srajag committed Feb 21, 2017
1 parent 1131bfb commit 09af0c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dpdk/vr_dpdk_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,8 +899,10 @@ dpdk_mbuf_parse_and_hash_packets(struct rte_mbuf *mbuf)
*/
udp_hdr = (struct vr_udp *)((uintptr_t)ipv4_hdr + ipv4_len);

if (unlikely(mbuf_data_len < pull_len + sizeof(struct vr_udp)))
return -1;
if (likely(vr_ip_transport_header_valid(ipv4_hdr))) {
if (unlikely(mbuf_data_len < pull_len + sizeof(struct vr_udp)))
return -1;
}

/*
* If it is a packet from VM, it for sure will not be MPLS-over-UDP,
Expand Down

0 comments on commit 09af0c8

Please sign in to comment.