diff options
author | Willem de Bruijn <willemb@google.com> | 2018-07-06 10:12:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-07 10:58:49 +0900 |
commit | b515430ac9c25d5192cf498af3c6be6c4f51caad (patch) | |
tree | b11ac766cd06f15c8eb9ae83d4cb96fecef97342 /net/ipv6/raw.c | |
parent | 351782067b6be81879b0af0daf7bd3acbb32d986 (diff) |
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 9887cba19978 ("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>
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 5737c50f16eb..5f40670271ee 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -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) |