[ovs-dev] [PATCH 6/6] ofproto: Don't always treat passive controllers as "equal".

Ben Pfaff blp at ovn.org
Mon Oct 29 22:57:51 UTC 2018


If a passive controller chooses to configure itself as a slave controller,
I don't know a reason why it should be considered "equal" for some
purposes.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 ofproto/ofproto.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 29a40cd539f5..af73d660afe7 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -3411,8 +3411,7 @@ handle_set_config(struct ofconn *ofconn, const struct ofp_header *oh)
 static enum ofperr
 reject_slave_controller(struct ofconn *ofconn)
 {
-    if (ofconn_get_type(ofconn) == OFCONN_PRIMARY
-        && ofconn_get_role(ofconn) == OFPCR12_ROLE_SLAVE) {
+    if (ofconn_get_role(ofconn) == OFPCR12_ROLE_SLAVE) {
         return OFPERR_OFPBRC_IS_SLAVE;
     } else {
         return 0;
-- 
2.16.1



More information about the dev mailing list