datapath: Don't dereference potentially NULL vport in patch ports.
authorJesse Gross <jesse@nicira.com>
Tue, 31 Jan 2012 22:22:25 +0000 (14:22 -0800)
committerJesse Gross <jesse@nicira.com>
Wed, 1 Feb 2012 00:08:30 +0000 (16:08 -0800)
commitc240693fc4d23786ab74bebfde45b44efc8ed39b
tree6d7b7cf12a0c9659b28d2e881c2b34b530b5a874
parent5442edb9e0afb6fdc4cd81e5d1ebd3e0d4e6accf
datapath: Don't dereference potentially NULL vport in patch ports.

When changing patch ports we need to update any peers pointing to us.
When destroying the port, this means pointing them to a NULL port.
However, the new namespaces code attempted to dereference this port
in order to get the namespace.  The net is already passed in, so we
can just use that instead.

Bug #9477

Reported-by: Michael Hu <mhu@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/vport-patch.c