summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDarrell Ball <dlu998@gmail.com>2019-02-20 08:17:18 -0800
committerBen Pfaff <blp@ovn.org>2019-02-22 14:10:58 -0800
commit0caac1e9174209bbf1e9f2ed6a56a44172e24da4 (patch)
tree78316c74b87f316d09694ea3ed8ed407dd38a9e6 /lib
parent1630b26fd2e96513a5ee75f977e4d84924e98b36 (diff)
downloadopenvswitch-0caac1e9174209bbf1e9f2ed6a56a44172e24da4.tar.gz
ipf: Handle non-zero L2 padding for first fragments.
Fixes: 4ea96698f667 ("Userspace datapath: Add fragmentation handling.") Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/ipf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ipf.c b/lib/ipf.c
index acddc0266..97d5b580a 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);