For SNAT, don't store the pre-fragment L2 header before actions are applied.
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 19:22:03 +0000 (11:22 -0800)
commitbf4091f1d27834b353c59f004a4cfd9789ab2668
tree890ddefd89a417278fadd5d8aa63fe39e3dc274f
parent4317a9e745861183ae62ccbfc2816b90482000d2
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.
(cherry picked from commit b4cd6fb07e0751832a22759e27c6ba63e3538c8b)
datapath/datapath.c
datapath/nx_act_snat.c
datapath/nx_act_snat.h