Looks Good.

Ethan

On Fri, Jul 22, 2011 at 15:32, Ben Pfaff <[email protected]> wrote:
> When a bit is set in flood_vlans, that VLAN must be flooded, but the logic
> here was reversed in the case where there were any flooded VLANs at all.
> Thus, if a single VLAN was configured to be flooded, all VLANs except that
> one were actually flooded.
>
> The common case where no VLANs were to be flooded was handled correctly.
>
> Reported-by: David Tsai <[email protected]>
> ---
>  lib/mac-learning.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/mac-learning.c b/lib/mac-learning.c
> index 4bb9f2a..3a3c54f 100644
> --- a/lib/mac-learning.c
> +++ b/lib/mac-learning.c
> @@ -148,7 +148,7 @@ mac_learning_set_flood_vlans(struct mac_learning *ml,
>  static bool
>  is_learning_vlan(const struct mac_learning *ml, uint16_t vlan)
>  {
> -    return vlan_bitmap_contains(ml->flood_vlans, vlan);
> +    return !ml->flood_vlans || !bitmap_is_set(ml->flood_vlans, vlan);
>  }
>
>  /* Returns true if 'src_mac' may be learned on 'vlan' for 'ml'.
> --
> 1.7.4.4
>
> _______________________________________________
> dev mailing list
> [email protected]
> http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to