in-band: Fix null pointer dereference.
authorBen Pfaff <blp@nicira.com>
Tue, 6 Apr 2010 19:46:12 +0000 (12:46 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 20 Apr 2010 18:01:44 +0000 (11:01 -0700)
Triggering this would require deleting the in-use datapath at just the
right time, but we still don't want it to happen.

ofproto/in-band.c

index 94024bc..adf89d1 100644 (file)
@@ -410,7 +410,7 @@ in_band_msg_in_hook(struct in_band *in_band, const flow_t *flow,
         }
 
         local_mac = get_local_mac(in_band);
-        if (eth_addr_equals(dhcp->chaddr, local_mac)) {
+        if (local_mac && eth_addr_equals(dhcp->chaddr, local_mac)) {
             return true;
         }
     }