From dece4bacae29e94c41430fb5dcdf6cbe5290b2b8 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Mon, 6 Oct 2008 15:14:52 -0700 Subject: [PATCH] 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. --- datapath/forward.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.30.2