On Wed, Nov 07, 2012 at 05:03:04PM +0900, Simon Horman wrote:
> Signed-off-by: Simon Horman <ho...@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.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to