clatd: don't 'pretend' to disable IPV6_CHECKSUM
This code is not needed.
The comment doesn't match the functionality as implemented:
0 means *ON* at offset 0 - not clear when this would make sense.
2 means on at offset 2 - this would be correct for IPPROTO_ICMPV6
4 means on at offset 4 - thus would be correct for IPPROTO_MH
-1 would actually mean off, but that's also the socket creation default.
In practice this doesn't even matter, because this socket is used
only for transmit and sockets like this one which are created via
socket(AF_INET6, SOCK_RAW, IPPROTO_RAW) default to having IPV6_HDRINCL
enabled which doesn't even support transmit checksum calculation.
This is because on a header inclusive RAW6 socket rawv6_sendmsg (which
is the core implementation for all write operations on AF_INET6 raw
sockets) calls into rawv6_send_hdrinc instead of ip6_append_data
and ip6_flush_pending_frames/rawv6_push_pending_frames and simply never
even references the socket field that the IPV6_CHECKSUM socket option
changes (easy to check by checking accesses to raw6_sk(sk)->checksum).
Also: it would be hard to make it support it due to checksum offset
being protocol dependent and thus not even a constant on all protocol
capable (ie. IPPROTO_RAW) sockets.
Test: built, flashed to flame verified ipv4 clat functionality with no offload
Bug: 150730674
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I62990f427c24cf62a38bd63d5c9d9dea4f0dc2f6
1 file changed