support IPV6_TCLASS, IPV6_UNICAST_HOPS and IP_CHECKSUM options#2931
Open
TusharMohapatra07 wants to merge 2 commits into
Open
support IPV6_TCLASS, IPV6_UNICAST_HOPS and IP_CHECKSUM options#2931TusharMohapatra07 wants to merge 2 commits into
TusharMohapatra07 wants to merge 2 commits into
Conversation
IPv6 sockets have TOS and TTL equivalents (IPV6_TCLASS and IPV6_UNICAST_HOPS) that were not being dumped or restored. Add support for both options in the AF_INET6 branch of dump_ip_opts() and restore_ip_opts(), reusing the existing ip_opts_entry.tos and ip_opts_entry.ttl proto fields which are already used for the IPv4 IP_TOS and IP_TTL counterparts. Additionally, ip_opts_raw_entry already had a 'checksum' field defined in the protobuf schema for IP_CHECKSUM, but the corresponding dump and restore calls were never implemented. Wire up IP_CHECKSUM in dump_ip_raw_opts() and restore_ip_opts() for AF_INET raw sockets. Signed-off-by: Tushar Mohapatra <tusharmohapatra.gig@gmail.com>
Add IPV6_UNICAST_HOPS and IPV6_TCLASS to the sk_opts_v6[] table so that the sock_ip_opts00/01 tests cover the newly supported IPv6 options. Add a sk_raw_opts_v4[] table for raw-socket-only options and test IP_CHECKSUM on AF_INET SOCK_RAW sockets. Signed-off-by: Tushar Mohapatra <tusharmohapatra.gig@gmail.com>
Contributor
Author
|
A friendly reminder that this PR had no activity for 30 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IPv6 sockets have TOS and TTL equivalents (
IPV6_TCLASSandIPV6_UNICAST_HOPS) that were not being dumped or restored. Add support for both options in theAF_INET6branch ofdump_ip_opts()andrestore_ip_opts(), reusing the existingip_opts_entry.tosandip_opts_entry.ttlproto fields which are already used for the IPv4IP_TOSandIP_TTLcounterparts.Additionally,
ip_opts_raw_entryalready had achecksumfield defined in the protobuf schema forIP_CHECKSUM, but the corresponding dump and restore calls were never implemented. Wire upIP_CHECKSUMindump_ip_raw_opts()andrestore_ip_opts()forAF_INETraw sockets.Part of #2007