rconn: Maintain original allowed_versions instead of substituting for zero.
authorBen Pfaff <blp@nicira.com>
Wed, 5 Dec 2012 02:23:00 +0000 (18:23 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 5 Dec 2012 02:23:00 +0000 (18:23 -0800)
commit5b8ab80c0897d9cc91488505a447dcf4a4e4b448
tree4b2f927ea5c35fa5acd8d4a4f1b50d2ecef5ab9f
parent314e60e19507f12b89faaf8e605bd8e818cfe0a2
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 90ef0206ea8f5a39 (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>
lib/rconn.c