From: Ben Pfaff Date: Tue, 10 Aug 2010 18:23:02 +0000 (-0700) Subject: learning-switch: Ignore "packet_in"s caused by OFPP_CONTROLLER actions. X-Git-Tag: v1.1.0pre1~18 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=6699af68e60e0d03671d1424a5f53258928b16d4 learning-switch: Ignore "packet_in"s caused by OFPP_CONTROLLER actions. It seems best to ignore "packet_in"s caused by OFPP_CONTROLLER actions in learning-switch, since someone might be experimenting and it's best not to interfere with that. --- diff --git a/lib/learning-switch.c b/lib/learning-switch.c index bca479ef2..88a8618c8 100644 --- a/lib/learning-switch.c +++ b/lib/learning-switch.c @@ -374,6 +374,13 @@ process_packet_in(struct lswitch *sw, struct rconn *rconn, void *opi_) struct ofpbuf pkt; flow_t flow; + /* Ignore packets sent via output to OFPP_CONTROLLER. This library never + * uses such an action. You never know what experiments might be going on, + * though, and it seems best not to interfere with them. */ + if (opi->reason != OFPR_NO_MATCH) { + return; + } + /* Extract flow data from 'opi' into 'flow'. */ pkt_ofs = offsetof(struct ofp_packet_in, data); pkt_len = ntohs(opi->header.length) - pkt_ofs;