From 84173c87087670917c9c41de19ec78f2da4a9fb6 Mon Sep 17 00:00:00 2001 From: Alin Serdean Date: Wed, 30 Sep 2015 21:00:43 +0000 Subject: 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 Acked-by: Nithin Raju Signed-off-by: Ben Pfaff --- datapath-windows/ovsext/PacketParser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'datapath-windows/ovsext/PacketParser.c') 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; } -- cgit v1.2.1