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

Message ID 20181029225751.5936-6-blp@ovn.org
State New
Headers show
Series
  • [ovs-dev,1/6] connmgr: Modernize coding style.
Related show

Commit Message

Ben Pfaff Oct. 29, 2018, 10:57 p.m.
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@ovn.org>
---
 ofproto/ofproto.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

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;