Looks good.

--Justin


On Jul 1, 2011, at 10:14 AM, Ben Pfaff wrote:

> If the netdev_open() fails then iface->netdev will be NULL and
> iface_refresh_stats() will cause a null pointer dereference in
> netdev_get_stats().
> 
> Fixes a problem introduced by commit 1101a0b47 "bridge: Populate interface
> status/statistics as soon as a port is added."
> 
> Reported-by: Aaron Rosen <aro...@clemson.edu>
> ---
> vswitchd/bridge.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index 9354403..446f4fc 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -869,7 +869,7 @@ bridge_add_ofproto_ports(struct bridge *br)
>             }
> 
>             /* Populate stats columns in new Interface rows. */
> -            if (!iface->cfg->mtu) {
> +            if (iface->netdev && !iface->cfg->mtu) {
>                 iface_refresh_stats(iface);
>                 iface_refresh_status(iface);
>             }
> -- 
> 1.7.4.4
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to