ofproto-dpif: Avoid segfault for ports with bundles in add_mirror_actions().
authorBen Pfaff <blp@nicira.com>
Tue, 13 Dec 2011 22:42:11 +0000 (14:42 -0800)
committerBen Pfaff <blp@nicira.com>
Tue, 13 Dec 2011 22:42:11 +0000 (14:42 -0800)
commit521472bcd66ba7b2553183615a70e9dbac356d4f
tree1f9e7b3a3d099c01d28a805a0b342663036b1383
parent8d62e151dd35645f9550b461144630d4f45d320e
ofproto-dpif: Avoid segfault for ports with bundles in add_mirror_actions().

Not every port has an associated bundle, so we must not unconditionally
dereference ofport->bundle without first checking that it is nonnull.

(One example of a port without a bundle is a VLAN splinter port.)

Bug #8671.
Reported-by: Michael Mao <mmao@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c