ofproto: Fix ofport allocation.
authorGurucharan Shetty <gshetty@nicira.com>
Tue, 20 Nov 2012 11:18:11 +0000 (03:18 -0800)
committerGurucharan Shetty <gshetty@nicira.com>
Tue, 20 Nov 2012 14:00:43 +0000 (06:00 -0800)
commit4780f13745796a22ac1971bb9bf90a39317d7094
tree450f788ad3c5a982f9b5b14ad991bf2ccd19e520
parentee4dd8eb947b13dfc76f7898e9929d58b48ce03c
ofproto: Fix ofport allocation.

Currently running the following 3 commands results
in vswitchd running in an infinite loop.

ovs-vsctl add-port br1 port1 -- set interface port1 \
type=internal ofport_request=1
ovs-vsctl add-port br1 port2 -- set interface port2 \
type=internal ofport_request=2
ovs-vsctl add-port br1 port3 -- set interface port3 \
type=internal

This patch lets us go through all the possible ofport
values to find a free ofport.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
ofproto/ofproto.c