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:57:42 +0000 (14:57 -0800)
commited0a43ab99ae3ca8bbf0c12bcd0487a6715b6aa6
treed5d8d1f69772ee03759df5647d99281338c0bbfe
parent4cf7aabac84e724929f9ab4031f0ea07a2cd0f1c
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