ofproto-dpif: Un-wildcard nw_frag only for protocols that have fragments.
authorBen Pfaff <blp@nicira.com>
Fri, 10 Jan 2014 23:17:43 +0000 (15:17 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 13 Jan 2014 23:45:31 +0000 (15:45 -0800)
commit0934ebbad0fda79dfae38e2de62cca7f9c7227b4
tree64e3c19e2fb8f7fa7331726b9d4e4d3908791f1d
parentad1aaa8b0318280a32f74e4bdf4ec2ff23d278bf
ofproto-dpif: Un-wildcard nw_frag only for protocols that have fragments.

The revalidator code in ofproto-dpif-upcall.c, in revalidate_ukey(),
deletes any datapath flow for which the kernel reports wildcarded bits
that userspace requires to be matched.  Until now, a couple of pieces of
code in ofproto-dpif always marked nw_frag (which tracks whether a packet
is an IPv4 or IPV6 fragment) as exact-match.  For non-IP protocols, this
wasn't meaningful, so adding such a flow to the datapath and then receiving
it back caused nw_frag to become wildcarded, so revalidate_ukey() always
deleted them.

This fixes the problem by only un-wildcarding nw_frag for protocols where
it is defined (IPv4 and IPv6).

Noticed while observing CFM traffic (which isn't IP based) over a tunnel.

Reported-by: Guolin Yang <gyang@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-dpif.c