vswitchd: Fix segfault when packet received on unknown port.
authorBen Pfaff <blp@nicira.com>
Mon, 2 Mar 2009 22:12:26 +0000 (14:12 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 2 Mar 2009 22:12:26 +0000 (14:12 -0800)
This problem and its fixed are independent of the recent secchan
restructuring (even though it turned out to be a good way to trigger it).

vswitchd/bridge.c

index bac25b16aa1efec8e78d2e6ff1247e9c8c717bd1..03cd016722ac3aa8ec635218b64f9766614347d0 100644 (file)
@@ -1612,7 +1612,8 @@ process_flow(struct bridge *br, const flow_t *flow,
                 ftf_set_dsts(f, NULL, 0);
                 f->tags = tags;
             } else {
-                ft_insert(br->ft, ftf_create(flow, NULL, 0, tags));
+                f = ftf_create(flow, NULL, 0, tags);
+                ft_insert(br->ft, f);
             }
 
             /* Mark the flow as being needed to drop packets.  (If we don't do