diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-07-01 10:13:35 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-07-01 10:14:04 -0700 |
| commit | 316dec68688aeccc1bbb90e555d9c0ca259d9fc7 (patch) | |
| tree | 46cac49d03e60162198d512e20b909b17fb91e96 /vswitchd | |
| parent | feb83d8aae83a549e660380820df40ee2490b1d9 (diff) | |
| download | openvswitch-316dec68688aeccc1bbb90e555d9c0ca259d9fc7.tar.gz | |
bridge: Fix null pointer dereference.
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 <arosen@clemson.edu>
Diffstat (limited to 'vswitchd')
| -rw-r--r-- | vswitchd/bridge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 935440323..446f4fc0c 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); } |
