]> git.baikalelectronics.ru Git - kernel.git/commit
net: ping6: support setting basic SOL_IPV6 options via cmsg
authorJakub Kicinski <kuba@kernel.org>
Thu, 17 Feb 2022 01:21:16 +0000 (17:21 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Feb 2022 14:22:09 +0000 (14:22 +0000)
commit822a87154db4fe28f4a710b426b83b0f7d62b4d0
treed10073f30bfd0653e95f65b872bfe878ecfd4aa7
parentebf565a181b2059dccac432e1ea8686661e899bf
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>
net/ipv6/ip6_output.c
net/ipv6/ping.c