Properly set in_port in skb for Flow Mod messages.
authorJustin Pettit <jpettit@nicira.com>
Mon, 6 Oct 2008 22:14:52 +0000 (15:14 -0700)
committerJustin Pettit <jpettit@nicira.com>
Mon, 6 Oct 2008 22:14:52 +0000 (15:14 -0700)
When a buffer id is placed in a Flow Mod message, the actions are expected to
be executed against the referenced packet.  The kernel implementation was
not setting the input device to what the controller was telling it to use.
Thanks to Natasha for catching this.

datapath/forward.c

index 9bbb030b6d414ddd2941687a37aecb3cf924b2cb..48bec7caebbccf6db1a89da3e3b113c1d1f82699 100644 (file)
@@ -246,6 +246,7 @@ add_flow(struct sw_chain *chain, const struct sender *sender,
                if (skb) {
                        struct sw_flow_key key;
                        flow_used(flow, skb);
+                       dp_set_origin(chain->dp, ntohs(ofm->match.in_port), skb);
                        flow_extract(skb, ntohs(ofm->match.in_port), &key);
                        execute_actions(chain->dp, skb, &key, ofm->actions, actions_len, 0);
                }