mirror of
https://github.com/openvswitch/ovs
synced 2025-10-29 15:28:56 +00:00
rconn: Maintain original allowed_versions instead of substituting for zero.
rconn_create() was substituting OFPUTIL_DEFAULT_VERSIONS if an
allowed_versions of 0 was passed in. At the same time,
connmgr_set_controllers() compared the adjusted value of allowed_versions
against the original value, saw that they were different, and concluded
that it should kill off and recreate the rconn with the "corrected"
allowed_versions.
This commit fixes the problem by no longer adjusting allowed_versions.
There is no need, because it is only used in contexts where the original
version is OK.
This problem was introduced by commit 90ef0206ea (connmgr:
Reinitialise controllers if protocols changes).
Bug #14126.
CC: Simon Horman <horms@verge.net.au>
Reported-by: Natasha Gude <natasha@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
12
lib/rconn.c
12
lib/rconn.c
@@ -174,10 +174,10 @@ static bool rconn_logging_connection_attempts__(const struct rconn *);
|
|||||||
*
|
*
|
||||||
* Connections made by the rconn will automatically negotiate an OpenFlow
|
* Connections made by the rconn will automatically negotiate an OpenFlow
|
||||||
* protocol version acceptable to both peers on the connection. The version
|
* protocol version acceptable to both peers on the connection. The version
|
||||||
* negotiated will be one of those in the 'allowed_versions' bitmap:
|
* negotiated will be one of those in the 'allowed_versions' bitmap: version
|
||||||
* version 'x' is allowed if allowed_versions & (1 << x) is nonzero. If
|
* 'x' is allowed if allowed_versions & (1 << x) is nonzero. (The underlying
|
||||||
* 'allowed_versions' is zero, then OFPUTIL_DEFAULT_VERSIONS are allowed.
|
* vconn will treat an 'allowed_versions' of 0 as OFPUTIL_DEFAULT_VERSIONS.)
|
||||||
**/
|
*/
|
||||||
struct rconn *
|
struct rconn *
|
||||||
rconn_create(int probe_interval, int max_backoff, uint8_t dscp,
|
rconn_create(int probe_interval, int max_backoff, uint8_t dscp,
|
||||||
uint32_t allowed_versions)
|
uint32_t allowed_versions)
|
||||||
@@ -218,9 +218,7 @@ rconn_create(int probe_interval, int max_backoff, uint8_t dscp,
|
|||||||
rconn_set_dscp(rc, dscp);
|
rconn_set_dscp(rc, dscp);
|
||||||
|
|
||||||
rc->n_monitors = 0;
|
rc->n_monitors = 0;
|
||||||
rc->allowed_versions = allowed_versions
|
rc->allowed_versions = allowed_versions;
|
||||||
? allowed_versions
|
|
||||||
: OFPUTIL_DEFAULT_VERSIONS;
|
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user