aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTakashi Kawaguchi <kawaguchi-takashi@mxd.nes.nec.co.jp>2013-05-10 02:39:34 +0900
committerJesse Gross <jesse@nicira.com>2013-05-09 14:16:22 -0700
commitcda2457fa33533fabc882fbea64ea0427346aa96 (patch)
tree6b1a84c90a524d5d4a78fffbbf05b74057b85119 /lib
parentca7530cdc166e8e5f3ec41f98b2023c55312ea23 (diff)
flow: Fix IPv6 fragment packet handling
IPv6 fragmented packet (except first fragment) will not be handled correctly. When extracting packet at parse_ipv6(), although nw_frag should have both of FLOW_NW_FRAG_ANY and FLOW_NW_FRAG_LATER for later fragment, only FLOW_NW_FRAG_LATER is set. Signed-off-by: Takashi Kawaguchi <kawaguchi-takashi@mxd.nes.nec.co.jp> Signed-off-by: Ken Ajiro <ajiro@mxw.nes.nec.co.jp> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/flow.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/flow.c b/lib/flow.c
index 4e87ef2e..c664cb4f 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -214,9 +214,8 @@ parse_ipv6(struct ofpbuf *packet, struct flow *flow)
/* We only process the first fragment. */
if (frag_hdr->ip6f_offlg != htons(0)) {
- if ((frag_hdr->ip6f_offlg & IP6F_OFF_MASK) == htons(0)) {
- flow->nw_frag = FLOW_NW_FRAG_ANY;
- } else {
+ flow->nw_frag = FLOW_NW_FRAG_ANY;
+ if ((frag_hdr->ip6f_offlg & IP6F_OFF_MASK) != htons(0)) {
flow->nw_frag |= FLOW_NW_FRAG_LATER;
nexthdr = IPPROTO_FRAGMENT;
break;