From a0baa7dfa4fe257fada82623a9564e334f68ca91 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 24 Oct 2018 14:23:38 -0700 Subject: connmgr: Make treatment of active and passive connections more uniform. Until now, connmgr has handled active and passive OpenFlow connections in quite different ways. Any active connection, whether it was currently connected or not, was always maintained as an ofconn. Whenever such a connection (re)connected, its settings were cleared. On the other hand, passive connections had a separate listener which created an ofconn when a new connection came in, and these ofconns would be deleted when such a connection was closed. This approach is inelegant and has occasionally led to bugs when reconnection didn't clear all of the state that it should have. There's another motivation here. Currently, active connections are always primary controllers and passive connections are always service controllers (as documented in ovs-vswitchd.conf.db(5)). Sometimes it would be useful to have passive primary controllers (maybe active service controllers too but I haven't personally run into that use case). As is, this is difficult to implement because there is so much different code in use between active and passive connections. This commit will make it easier. Signed-off-by: Ben Pfaff --- vswitchd/bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vswitchd') diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 83708ee51..de5793dd0 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2718,7 +2718,7 @@ ofp12_controller_role_to_str(enum ofp12_controller_role role) return "slave"; case OFPCR12_ROLE_NOCHANGE: default: - return "*** INVALID ROLE ***"; + return NULL; } } -- cgit v1.2.1