Drop controller-bound traffic that arrives on the controller's port.
authorBen Pfaff <blp@nicira.com>
Tue, 5 Aug 2008 20:05:56 +0000 (13:05 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 7 Aug 2008 17:10:11 +0000 (10:10 -0700)
commitd7f1e2b5358e75b2befd07bd99faf09a9ad771d2
tree21286569660ac0be2694c2ed3867ddf0f2bf219b
parent5caaf64f202b5daaa6eda08aa279202b16524062
Drop controller-bound traffic that arrives on the controller's port.

Before, if a hub connected a number of OpenFlow switches and the controller,
then in-band control traffic from one of the OpenFlow switches would be
seen by each of the other switches and forwarded up to the controller as
an ofp_packet_in message.  That message would then be seen by all of the
other OpenFlow switches and also forwarded, and so on in an infinite loop.

This change prevents this situation by keeping secchan from forwarding
ofp_packet_in messages for a packet destined to the controller that
arrives on the port where the controller is located.

This code has at least two weaknesses.  First, if the controller's port
changes, then the flows set up to drop packets will not be deleted.  This
should not be a major problem: if this inadvertently kills a switch's
connection to the controller, then the switch will realize it after it
stops receiving data and re-connect.  Its new connection will have new
flow data and therefore its packets will not be dropped.

Second, the notion of the "controller's port" does not take into account
the possibility of loops in the network topology.  We need spanning tree
protocol for that.
include/vconn.h
lib/vconn.c
secchan/secchan.c