From: Andy Zhou Date: Fri, 25 Apr 2014 02:21:40 +0000 (-0700) Subject: ofproto-bond: do not allow recirculation when we failed to allocate recirc_id X-Git-Tag: sliver-openvswitch-2.2.90-1~3^2~52 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=9e4e33db91d28bf570a05db32db46a1952f91684 ofproto-bond: do not allow recirculation when we failed to allocate recirc_id When recirc pool is exhausted, a new bond won't be allocate a new recirc_id. The bond->recirc_id will remain zero. This condition should prevent the bond from use recirculation. This check was missing before this patch. Signed-off-by: Andy Zhou Acked-by: Ben Pfaff --- diff --git a/ofproto/bond.c b/ofproto/bond.c index 630e535c9..2fa65a9ac 100644 --- a/ofproto/bond.c +++ b/ofproto/bond.c @@ -888,7 +888,7 @@ bool bond_may_recirc(const struct bond *bond, uint32_t *recirc_id, uint32_t *hash_bias) { - if (bond->balance == BM_TCP) { + if (bond->balance == BM_TCP && recirc_id) { if (recirc_id) { *recirc_id = bond->recirc_id; }