diff options
author | Wang Hai <wanghai38@huawei.com> | 2020-12-04 19:43:14 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-04 15:43:14 -0800 |
commit | bb2da7651a47dc042cb7fc9c40cd77092b6b4445 (patch) | |
tree | 7d1dfc8bee8966ac6b34cc203e0d85ad4e053c07 | |
parent | ee4f52a8de2c6f78b01f10b4c330867d88c1653a (diff) | |
download | linux-bb2da7651a47dc042cb7fc9c40cd77092b6b4445.tar.gz linux-bb2da7651a47dc042cb7fc9c40cd77092b6b4445.tar.bz2 linux-bb2da7651a47dc042cb7fc9c40cd77092b6b4445.zip |
openvswitch: fix error return code in validate_and_copy_dec_ttl()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Changing 'return start' to 'return action_start' can fix this bug.
Fixes: 69929d4c49e1 ("net: openvswitch: fix TTL decrement action netlink message format")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Reviewed-by: Eelco Chaudron <echaudro@redhat.com>
Link: https://lore.kernel.org/r/20201204114314.1596-1-wanghai38@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | net/openvswitch/flow_netlink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c index ec0689ddc635..4c5c2331e764 100644 --- a/net/openvswitch/flow_netlink.c +++ b/net/openvswitch/flow_netlink.c @@ -2531,7 +2531,7 @@ static int validate_and_copy_dec_ttl(struct net *net, action_start = add_nested_action_start(sfa, OVS_DEC_TTL_ATTR_ACTION, log); if (action_start < 0) - return start; + return action_start; err = __ovs_nla_copy_actions(net, actions, key, sfa, eth_type, vlan_tci, mpls_label_count, log); |