ipv6: ipcm6_cookie initializer

Initialize the cookie in one location to reduce code duplication and
avoid bugs from inconsistent initialization, such as that fixed in
commit 9887cba199 ("ip: limit use of gso_size to udp").

Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Willem de Bruijn 2018-07-06 10:12:55 -04:00 committed by David S. Miller
parent 351782067b
commit b515430ac9
6 changed files with 25 additions and 18 deletions

View file

@ -791,10 +791,7 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
fl6.flowi6_mark = sk->sk_mark;
fl6.flowi6_uid = sk->sk_uid;
ipc6.hlimit = -1;
ipc6.tclass = -1;
ipc6.dontfrag = -1;
ipc6.opt = NULL;
ipcm6_init(&ipc6);
if (sin6) {
if (addr_len < SIN6_LEN_RFC2133)