Skip to content

Commit bb2da76

Browse files
Wang Haikuba-moo
Wang Hai
authored andcommitted
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: 69929d4 ("net: openvswitch: fix TTL decrement action netlink message format") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Wang Hai <[email protected]> Reviewed-by: Eelco Chaudron <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ee4f52a commit bb2da76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/openvswitch/flow_netlink.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2531,7 +2531,7 @@ static int validate_and_copy_dec_ttl(struct net *net,
25312531

25322532
action_start = add_nested_action_start(sfa, OVS_DEC_TTL_ATTR_ACTION, log);
25332533
if (action_start < 0)
2534-
return start;
2534+
return action_start;
25352535

25362536
err = __ovs_nla_copy_actions(net, actions, key, sfa, eth_type,
25372537
vlan_tci, mpls_label_count, log);

0 commit comments

Comments
 (0)