datapath: Calculate flow hash after extracting metadata.
authorJesse Gross <jesse@nicira.com>
Thu, 8 Sep 2011 22:32:24 +0000 (15:32 -0700)
committerJesse Gross <jesse@nicira.com>
Thu, 8 Sep 2011 23:07:36 +0000 (16:07 -0700)
commit0fe255dfbf37fa7ddc23c2593c512c092b0f61d7
tree87009c2d5c39bff772a6a00789e2ca53b9dba84a
parentff8d7a5e81625bbb13d33ca73888fc848b02db83
datapath: Calculate flow hash after extracting metadata.

When we execute a packet from userspace we first extract the header
fields from the packet and then add supplied metadata.  However, we
compute the hash of the packet in between these two steps despite
the fact that the metadata can affect the hash.  This can lead to
two separate hashes for packets of the same flow.

Found by code inspection, not an actual real-world problem.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/datapath.c