diff mbox series

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

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

Commit Message

Ben Pfaff Oct. 29, 2018, 10:57 p.m. UTC
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(-)

Comments

Justin Pettit Feb. 5, 2019, 8:51 p.m. UTC | #1
> On Oct 29, 2018, at 3:57 PM, Ben Pfaff <blp@ovn.org> wrote:
> 
> 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>

Acked-by: Justin Pettit <jpettit@ovn.org>

--Justin
Ben Pfaff Feb. 5, 2019, 9:54 p.m. UTC | #2
On Tue, Feb 05, 2019 at 12:51:12PM -0800, Justin Pettit wrote:
> 
> > On Oct 29, 2018, at 3:57 PM, Ben Pfaff <blp@ovn.org> wrote:
> > 
> > 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>
> 
> Acked-by: Justin Pettit <jpettit@ovn.org>

Thank you for the reviews.  I applied them to master.
diff mbox series

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;