On Thu, Aug 25, 2011 at 4:28 PM, Ethan Jackson <[email protected]> wrote:
> diff --git a/datapath/dp_notify.c b/datapath/dp_notify.c
> index 94d671d..bbfd242 100644
> --- a/datapath/dp_notify.c
> +++ b/datapath/dp_notify.c
> @@ -33,8 +34,19 @@ static int dp_device_event(struct notifier_block *unused, 
> unsigned long event,
>
>        switch (event) {
>        case NETDEV_UNREGISTER:
> -               if (!is_internal_dev(dev))
> +               if (!is_internal_dev(dev)) {
> +                       struct sk_buff *reply;
> +
>                        dp_detach_port(vport);
> +                       reply = ovs_vport_cmd_build_info(vport, 0, 0,
> +                                                        OVS_VPORT_CMD_DEL);
> +                       if (IS_ERR(reply))
> +                               break;
> +

In the error case you should call netlink_set_err(), otherwise
userspace won't know that it potentially missed a notification.  This
isn't done in some other places because we allocate the message before
actually performing the action and don't do it if the allocation
fails.  In this case, however, that isn't possible.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to