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 <[email protected]> --- 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 [email protected] http://openvswitch.org/mailman/listinfo/dev
