- if (out_port == OFPP_FLOOD)
- return output_all(dp, skb, 1);
- else if (out_port == OFPP_ALL)
- return output_all(dp, skb, 0);
- else if (out_port == OFPP_CONTROLLER)
- return dp_output_control(dp, skb, fwd_save_skb(skb), 0,
- OFPR_ACTION);
- else if (out_port == OFPP_TABLE) {
+ switch (out_port){
+ case OFPP_IN_PORT:
+ /* Send it out the port it came in on, which is already set in
+ * the skb. */
+ if (!skb->dev) {
+ if (net_ratelimit())
+ printk("skb device not set forwarding to in_port\n");
+ kfree(skb);
+ return -ESRCH;
+ }
+ return xmit_skb(skb);
+
+ case OFPP_TABLE: {