summaryrefslogtreecommitdiff
path: root/net/l2tp/l2tp_ip6.c
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2018-07-06 10:12:55 -0400
committerDavid S. Miller <davem@davemloft.net>2018-07-07 10:58:49 +0900
commitb515430ac9c25d5192cf498af3c6be6c4f51caad (patch)
treeb11ac766cd06f15c8eb9ae83d4cb96fecef97342 /net/l2tp/l2tp_ip6.c
parent351782067b6be81879b0af0daf7bd3acbb32d986 (diff)
downloadlwn-b515430ac9c25d5192cf498af3c6be6c4f51caad.tar.gz
lwn-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/l2tp/l2tp_ip6.c')
-rw-r--r--net/l2tp/l2tp_ip6.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
index 957369192ca1..38f80691f4ab 100644
--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -525,9 +525,7 @@ static int l2tp_ip6_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;
+ ipcm6_init(&ipc6);
if (lsa) {
if (addr_len < SIN6_LEN_RFC2133)