From: Justin Pettit Date: Mon, 6 Oct 2008 22:14:52 +0000 (-0700) Subject: Properly set in_port in skb for Flow Mod messages. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dece4bacae29e94c41430fb5dcdf6cbe5290b2b8;p=openvswitch Properly set in_port in skb for Flow Mod messages. 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. --- diff --git a/datapath/forward.c b/datapath/forward.c index 9bbb030b..48bec7ca 100644 --- a/datapath/forward.c +++ b/datapath/forward.c @@ -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); }