]> 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)
commit94a2073fbf88323c5c240e9dd40107d2f3bf94b0
treed10073f30bfd0653e95f65b872bfe878ecfd4aa7
parent6ee12b1f8954177f33df056822bf9baac46b24f9
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