37c94b45fd
Before, we tried to use the port configuration bits to implement STP; e.g. if a port was in LISTEN state we turned off sending and receiving frame other than BPDUs. Unfortunately this interacts very badly with in-band control: when the switch connects to the controller, it can be connected to the controller over a port that is not in FORWARD, and so then the controller disabled that port, and the connection eventually dropped when an echo request/reply failed to get through. Now, we implement STP by querying the flows on the switch and killing off the ones that STP does not allow. This works much better because, although we still kill off the in-band control connection, the in-band hook in secchan is then able to resurrect it. --no-stp is still the default since this has not been tested very much.