Set up flow to drop packets that come in on their output port.
[openvswitch] / lib / learning-switch.c
index e3b4df5d9617164a5a5f7336b0e1848b8ee6f5fa..0dfdeae5a0aea961876b232ab7833a672b2ee939 100644 (file)
@@ -224,9 +224,9 @@ process_packet_in(struct lswitch *sw, struct rconn *rconn,
     }
 
     if (in_port == out_port) {
-        /* The input port and output port match, so just drop the packet 
-         * by returning. */
-        return;
+        /* The input and output port match.  Set up a flow to drop packets. */
+        queue_tx(sw, rconn, make_add_flow(&flow, ntohl(opi->buffer_id),
+                                          sw->max_idle, 0));
     } else if (sw->max_idle >= 0 && (!sw->ml || out_port != OFPP_FLOOD)) {
         /* The output port is known, or we always flood everything, so add a
          * new flow. */