Skip to content

Commit

Permalink
ipv6/ping: set skb->mark on icmpv6 sockets
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Willem de Bruijn authored and David S. Miller committed Jul 3, 2020
1 parent 91ffb9d commit cd8700e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv6/ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cd8700e

Please sign in to comment.