diff mbox series

[ovs-dev,v2,5/6] ipf: Handle non-zero L2 padding for first fragments.

Message ID 1550645838-417-5-git-send-email-dlu998@gmail.com
State Superseded
Headers show
Series [ovs-dev,v2,1/6] ipf: Misc Cleanup. | expand

Commit Message

Darrell Ball Feb. 20, 2019, 6:57 a.m. UTC
Fixes: 4ea96698f667 ("Userspace datapath: Add fragmentation handling.")
Signed-off-by: Darrell Ball <dlu998@gmail.com>
---

Following system tests will fail until patch 6 of the series; 
tests could otherwise be disabled in patch 4 then re-enabled in patch 6.

conntrack - IPv6 fragmentation, multiple extension headers
conntrack - IPv6 fragmentation, multiple extension headers + out of order
conntrack - IPv6 fragmentation, multiple extension headers 2
conntrack - IPv6 fragmentation, multiple extension headers 2 + out of order


 lib/ipf.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/lib/ipf.c b/lib/ipf.c
index acddc02..97d5b58 100644
--- a/lib/ipf.c
+++ b/lib/ipf.c
@@ -407,6 +407,7 @@  ipf_reassemble_v4_frags(struct ipf_list *ipf_list)
 {
     struct ipf_frag *frag_list = ipf_list->frag_list;
     struct dp_packet *pkt = dp_packet_clone(frag_list[0].pkt);
+    dp_packet_set_size(pkt, dp_packet_size(pkt) - dp_packet_l2_pad_size(pkt));
     struct ip_header *l3 = dp_packet_l3(pkt);
     int len = ntohs(l3->ip_tot_len);
 
@@ -451,6 +452,7 @@  ipf_reassemble_v6_frags(struct ipf_list *ipf_list)
 {
     struct ipf_frag *frag_list = ipf_list->frag_list;
     struct dp_packet *pkt = dp_packet_clone(frag_list[0].pkt);
+    dp_packet_set_size(pkt, dp_packet_size(pkt) - dp_packet_l2_pad_size(pkt));
     struct  ovs_16aligned_ip6_hdr *l3 = dp_packet_l3(pkt);
     int pl = ntohs(l3->ip6_plen) - sizeof(struct ovs_16aligned_ip6_frag);