summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2020-07-03 16:43:08 -0400
committerDavid S. Miller <davem@davemloft.net>2020-07-03 14:36:04 -0700
commitcd8700e45e73c5e5c32260ebc3092e50c1853e5d (patch)
tree1cef6ffa9e6458ee7e13317f390b240826d77f21
parent91ffb9d3823098e8efea7520ad8082a4bfaee739 (diff)
downloadlinux-cd8700e45e73c5e5c32260ebc3092e50c1853e5d.tar.gz
linux-cd8700e45e73c5e5c32260ebc3092e50c1853e5d.tar.bz2
linux-cd8700e45e73c5e5c32260ebc3092e50c1853e5d.zip
ipv6/ping: set skb->mark on icmpv6 sockets
IPv6 ping sockets route based on fwmark, but do not yet set skb->mark. Add this. IPv4 ping sockets also do both. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv6/ping.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c
index 98ac32b49d8c..6caa062f68e7 100644
--- a/net/ipv6/ping.c
+++ b/net/ipv6/ping.c
@@ -114,6 +114,7 @@ static int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
ipcm6_init_sk(&ipc6, np);
+ ipc6.sockc.mark = sk->sk_mark;
fl6.flowlabel = ip6_make_flowinfo(ipc6.tclass, fl6.flowlabel);
dst = ip6_sk_dst_lookup_flow(sk, &fl6, daddr, false);