diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-02-17 04:21:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-17 17:22:09 +0300 |
commit | 13651224c00b74a02c731b7840577f14e0311c83 (patch) | |
tree | d10073f30bfd0653e95f65b872bfe878ecfd4aa7 /net/ipv6/ip6_output.c | |
parent | d54f16c7fa3bc350b07049e0c0046c59bcbe7c3e (diff) | |
download | linux-13651224c00b74a02c731b7840577f14e0311c83.tar.xz |
net: ping6: support setting basic SOL_IPV6 options via cmsg
Support setting IPV6_HOPLIMIT, IPV6_TCLASS, IPV6_DONTFRAG
during sendmsg via SOL_IPV6 cmsgs.
tclass and dontfrag are init'ed from struct ipv6_pinfo in
ipcm6_init_sk(), while hlimit is inited to -1, so we need
to handle it being populated via cmsg explicitly.
Leave extension headers and flowlabel unimplemented.
Those are slightly more laborious to test and users
seem to primarily care about IPV6_TCLASS.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 0c6c971ce0a5..3286b64ec03d 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -1487,6 +1487,7 @@ static int __ip6_append_data(struct sock *sk, if (cork->length + length > mtu - headersize && ipc6->dontfrag && (sk->sk_protocol == IPPROTO_UDP || + sk->sk_protocol == IPPROTO_ICMPV6 || sk->sk_protocol == IPPROTO_RAW)) { ipv6_local_rxpmtu(sk, fl6, mtu - headersize + sizeof(struct ipv6hdr)); |