Service controllers can set their roles, so it's necessary to demote them to slaves if another controller becomes master. Unfortunately the 'controllers' hmap only contains primary controllers, so this was omitted.
Signed-off-by: Ben Pfaff <b...@nicira.com> --- ofproto/connmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 80b0f6d..be99529 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -932,7 +932,7 @@ ofconn_set_role(struct ofconn *ofconn, enum ofp12_controller_role role) if (role != ofconn->role && role == OFPCR12_ROLE_MASTER) { struct ofconn *other; - HMAP_FOR_EACH (other, hmap_node, &ofconn->connmgr->controllers) { + LIST_FOR_EACH (other, node, &ofconn->connmgr->all_conns) { if (other->role == OFPCR12_ROLE_MASTER) { other->role = OFPCR12_ROLE_SLAVE; ofconn_send_role_status(other, OFPCR12_ROLE_SLAVE, OFPCRR_MASTER_REQUEST); -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev