From 2c30e5d117bd45afaf0a107509b2c92b9a797380 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 11 Jan 2010 15:21:33 -0800 Subject: [PATCH] vswitch: Fix null pointer dereference in iface_is_internal(). Reported by Henrik Amren. --- vswitchd/bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index ea8161ff..0a8a9e09 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2009 Nicira Networks +/* Copyright (c) 2008, 2009, 2010 Nicira Networks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -3427,7 +3427,7 @@ iface_is_internal(const struct bridge *br, const char *if_name) } port = port_lookup(br, if_name); - if (port->n_ifaces > 1 && port->cfg->bond_fake_iface) { + if (port && port->n_ifaces > 1 && port->cfg->bond_fake_iface) { return true; } return false; -- 2.30.2