All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit aa379b44 authored by Ben Pfaff's avatar Ben Pfaff

ofproto: Ignore generation ID for role change to "equal".

The OpenFlow specification says that only role changes to slave or master
check the generation ID, so this is a bug fix.

OpenFlow 1.2 section A.3.9 phrases the requirement this way:

    Additionally, if the role value in the message is OFPCR_ROLE_MASTER
    or OFPCR_ROLE_SLAVE, the switch must validate generation_id to check
    for stale messages.

Found by OFTest.
Signed-off-by: default avatarBen Pfaff <blp@nicira.com>
parent 378af564
......@@ -5255,7 +5255,8 @@ handle_role_request(struct ofconn *ofconn, const struct ofp_header *oh)
}
if (request.role != OFPCR12_ROLE_NOCHANGE) {
if (request.have_generation_id
if (request.role != OFPCR12_ROLE_EQUAL
&& request.have_generation_id
&& !ofconn_set_master_election_id(ofconn, request.generation_id)) {
return OFPERR_OFPRRFC_STALE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment