[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200703204308.3372523-1-willemdebruijn.kernel@gmail.com>
Date: Fri, 3 Jul 2020 16:43:08 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, Willem de Bruijn <willemb@...gle.com>
Subject: [PATCH net-next] ipv6/ping: set skb->mark on icmpv6 sockets
From: Willem de Bruijn <willemb@...gle.com>
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@...gle.com>
---
net/ipv6/ping.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.27.0.212.ge8ba1cc988-goog
Powered by blists - more mailing lists