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/udp.c | |
parent | 351782067b6be81879b0af0daf7bd3acbb32d986 (diff) | |
download | linux-b515430ac9c25d5192cf498af3c6be6c4f51caad.tar.gz linux-b515430ac9c25d5192cf498af3c6be6c4f51caad.tar.bz2 linux-b515430ac9c25d5192cf498af3c6be6c4f51caad.zip |
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/udp.c')
-rw-r--r-- | net/ipv6/udp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index ac6fc6728903..940115da9843 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -1143,9 +1143,7 @@ int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) int (*getfrag)(void *, char *, int, int, int, struct sk_buff *); struct sockcm_cookie sockc; - ipc6.hlimit = -1; - ipc6.tclass = -1; - ipc6.dontfrag = -1; + ipcm6_init(&ipc6); ipc6.gso_size = up->gso_size; sockc.tsflags = sk->sk_tsflags; sockc.transmit_time = 0; |