Don't allow the learning switch to send packets back out the incoming port.
The learning switch functionality included in OpenFlow will send packets out the port they arrived on if the learned destination is from that port. This causes problems when newer switches flood packets for destinations they don't know and OpenFlow reinjects packets back into the network. The correct behavior is to just drop the packet.
This commit is contained in:
@@ -223,7 +223,11 @@ process_packet_in(struct lswitch *sw, struct rconn *rconn,
|
||||
out_port = mac_learning_lookup(sw->ml, flow.dl_dst);
|
||||
}
|
||||
|
||||
if (sw->max_idle >= 0 && (!sw->ml || out_port != OFPP_FLOOD)) {
|
||||
if (in_port == out_port) {
|
||||
/* The input port and output port match, so just drop the packet
|
||||
* by returning. */
|
||||
return;
|
||||
} 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. */
|
||||
queue_tx(sw, rconn, make_add_simple_flow(&flow, ntohl(opi->buffer_id),
|
||||
|
||||
Reference in New Issue
Block a user