We currently notify for port deletions in the namespace of the device that was deleted. In general this should be initial namespace because that's the only place where we look but it's possible that the device was moved after being attached. However, it's not semantically correct because we really care about the namespace of the userspace process, not that of the device. This switches to genl_multicast() which always uses the initial namespace and seems more appropriate anyways.
Signed-off-by: Jesse Gross <je...@nicira.com> --- datapath/dp_notify.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/datapath/dp_notify.c b/datapath/dp_notify.c index 122b2fa..415e83b 100644 --- a/datapath/dp_notify.c +++ b/datapath/dp_notify.c @@ -43,21 +43,20 @@ static int dp_device_event(struct notifier_block *unused, unsigned long event, switch (event) { case NETDEV_UNREGISTER: if (!is_internal_dev(dev)) { - struct sk_buff *reply; + struct sk_buff *notify; - reply = ovs_vport_cmd_build_info(vport, 0, 0, - OVS_VPORT_CMD_DEL); + notify = ovs_vport_cmd_build_info(vport, 0, 0, + OVS_VPORT_CMD_DEL); dp_detach_port(vport); - if (IS_ERR(reply)) { + if (IS_ERR(notify)) { netlink_set_err(INIT_NET_GENL_SOCK, 0, dp_vport_multicast_group.id, - PTR_ERR(reply)); + PTR_ERR(notify)); break; } - genl_notify(reply, dev_net(dev), 0, - dp_vport_multicast_group.id, NULL, - GFP_KERNEL); + genlmsg_multicast(notify, 0, dp_vport_multicast_group.id, + GFP_KERNEL); } break; -- 1.7.5.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev