datapath: Do not send notification if ovs_vport_set_options() failed
authorAnsis Atteka <aatteka@nicira.com>
Sat, 7 Apr 2012 00:35:12 +0000 (17:35 -0700)
committerAnsis Atteka <aatteka@nicira.com>
Mon, 9 Apr 2012 17:19:39 +0000 (10:19 -0700)
There is no need to send a notification if ovs_vport_set_options() failed
and ovs_vport_cmd_set() did not change anything.

Issue#10285

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
datapath/datapath.c

index 7f313940181477c5c5b3651a19baf370b8763b2e..2fe6fdd68be053434bb1717747a2c62e70d2290a 100644 (file)
@@ -1883,6 +1883,8 @@ static int ovs_vport_cmd_set(struct sk_buff *skb, struct genl_info *info)
                err = ovs_vport_set_options(vport, a[OVS_VPORT_ATTR_OPTIONS]);
        if (!err)
                err = change_vport(vport, a);
+       else
+               goto exit_unlock;
        if (!err && a[OVS_VPORT_ATTR_UPCALL_PID])
                vport->upcall_pid = nla_get_u32(a[OVS_VPORT_ATTR_UPCALL_PID]);