From 23adee4206a98975750a076f9298541868c7c504 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 17 May 2011 13:41:32 -0700 Subject: [PATCH] ofproto-dpif: Fix null pointer dereference in is_admissible(). If in_port is NULL then we must not dereference it. --- ofproto/ofproto-dpif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index b7194930..82bb0e0c 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -3526,7 +3526,7 @@ is_admissible(struct ofproto_dpif *ofproto, const struct flow *flow, /* Find the port and bundle for the received packet. */ in_port = get_ofp_port(ofproto, flow->in_port); - *in_bundlep = in_bundle = in_port->bundle; + *in_bundlep = in_bundle = in_port ? in_port->bundle : NULL; if (!in_port || !in_bundle) { /* No interface? Something fishy... */ if (have_packet) { -- 2.30.2