For SNAT, don't store the pre-fragment L2 header before actions are applied. for-nox/0.4
authorJustin Pettit <jpettit@nicira.com>
Mon, 26 Jan 2009 09:05:39 +0000 (01:05 -0800)
committerJustin Pettit <jpettit@nicira.com>
Mon, 26 Jan 2009 09:05:39 +0000 (01:05 -0800)
commitb4cd6fb07e0751832a22759e27c6ba63e3538c8b
tree3bfc9024ca124e1a6cd9658e9fd2f460443ea8aa
parentdfc7aa676ab44db7a49284a80798c7be5369db85
For SNAT, don't store the pre-fragment L2 header before actions are applied.

The IP fragment code doesn't always write the L2 header when generating
new fragments.  This problem was fixed in an earlier commit.
Unfortunately, we stored the pre-fragment L2 header when the packet
first arrived--before other packet modifications were applied.  This
meant that the results of any OpenFlow L2 modification actions were lost.
This patch pushes the storage of the L2 header until right before the
packet is transmitted (and possibly refragmented).

Thanks to Dan for catching this behavior.
datapath/datapath.c
datapath/nx_act_snat.c
datapath/nx_act_snat.h