[ovs-dev] [PATCH 06/14] connmgr: Use version of underlying rconn
Ben Pfaff
blp at nicira.com
Mon Nov 12 18:20:26 UTC 2012
On Wed, Nov 07, 2012 at 05:03:04PM +0900, Simon Horman wrote:
> Signed-off-by: Simon Horman <horms at verge.net.au>
It seems that OFPUTIL_P_NONE is not really a meaningful protocol enum
value. It just ends up being marked as NOT_REACHED() in every switch
statement, for example. I'd suggest avoiding that either by changing
OFPUTIL_P_NONE from an enum to a macro or by just using 0 (which is a
perfectly reasonable value for a bit-mask, really).
But I'm also concerned that the protocol of an ofconn can initially be
"none". Grepping for ofconn_get_protocol() or looking for ->protocol in
connmgr.c, I see a number of places where asynchronous messages (that
is, messages not in response to some request) are encoded to an ofconn.
I expect that all of those would assert-fail if ->protocol was 0. If
any of those can trigger sending a message on an ofconn before its
protocol is determined, then we've got a race in this code.
More information about the dev
mailing list