diff options
author | Alin Serdean <aserdean@cloudbasesolutions.com> | 2015-09-30 21:00:43 +0000 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2015-10-02 07:20:30 -0700 |
commit | 84173c87087670917c9c41de19ec78f2da4a9fb6 (patch) | |
tree | 7065c8bc8b6f9bf9d1ae9a007147f65d51d1bfc3 /datapath-windows/ovsext/PacketParser.c | |
parent | 21c5b0f755f7b532b7fbd62b08f3b885b0f6f5e3 (diff) | |
download | openvswitch-84173c87087670917c9c41de19ec78f2da4a9fb6.tar.gz |
datapath-windows: Fix IP fragmentation
Currently in the case of IP fragmentation we send to the userspace that
the flag for the last fragment is 3 when it actually should be a value
between 0..2.
This patch fixes the problem and also uses the values used in the common
header of the datapath.
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/PacketParser.c')
-rw-r--r-- | datapath-windows/ovsext/PacketParser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/datapath-windows/ovsext/PacketParser.c b/datapath-windows/ovsext/PacketParser.c index 2c955e1e6..e01be17e7 100644 --- a/datapath-windows/ovsext/PacketParser.c +++ b/datapath-windows/ovsext/PacketParser.c @@ -108,7 +108,7 @@ OvsParseIPv6(const NET_BUFFER_LIST *packet, ((nh->flow_lbl[0] & 0x0F) << 16) | (nh->flow_lbl[1] << 8) | nh->flow_lbl[2]; flow->nwTtl = nh->hop_limit; flow->nwProto = SOCKET_IPPROTO_NONE; - flow->nwFrag = 0; + flow->nwFrag = OVS_FRAG_TYPE_NONE; // Parse extended headers and compute L4 offset ofs += sizeof(IPv6Hdr); @@ -161,9 +161,9 @@ OvsParseIPv6(const NET_BUFFER_LIST *packet, /* We only process the first fragment. */ if (fragHdr->offlg != htons(0)) { if ((fragHdr->offlg & IP6F_OFF_HOST_ORDER_MASK) == htons(0)) { - flow->nwFrag = OVSWIN_NW_FRAG_ANY; + flow->nwFrag = OVS_FRAG_TYPE_FIRST; } else { - flow->nwFrag |= OVSWIN_NW_FRAG_LATER; + flow->nwFrag = OVS_FRAG_TYPE_LATER; nextHdr = SOCKET_IPPROTO_FRAGMENT; break; } |