Skip to content

Commit d55f0f8

Browse files
wdebruijSasha Levin
authored andcommitted
ipv6: remove leftover ip6 cookie initializer
[ Upstream commit 54580cc ] As of the blamed commit ipc6.dontfrag is always initialized at the start of udpv6_sendmsg, by ipcm6_init_sk, to either 0 or 1. Later checks against -1 are no longer needed and the branches are now dead code. The blamed commit had removed those branches. But I had overlooked this one case. UDP has both a lockless fast path and a slower path for corked requests. This branch remained in the fast path. Fixes: 0962085 ("ipv6: replace ipcm6_init calls with ipcm6_init_sk") Signed-off-by: Willem de Bruijn <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 0f08ebc commit d55f0f8

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

net/ipv6/ip6_output.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2055,8 +2055,6 @@ struct sk_buff *ip6_make_skb(struct sock *sk,
20552055
ip6_cork_release(cork, &v6_cork);
20562056
return ERR_PTR(err);
20572057
}
2058-
if (ipc6->dontfrag < 0)
2059-
ipc6->dontfrag = inet6_test_bit(DONTFRAG, sk);
20602058

20612059
err = __ip6_append_data(sk, &queue, cork, &v6_cork,
20622060
&current->task_frag, getfrag, from,

0 commit comments

Comments
 (0)