Skip to content

support IPV6_TCLASS, IPV6_UNICAST_HOPS and IP_CHECKSUM options#2931

Open
TusharMohapatra07 wants to merge 2 commits into
checkpoint-restore:criu-devfrom
TusharMohapatra07:feat/ipv6
Open

support IPV6_TCLASS, IPV6_UNICAST_HOPS and IP_CHECKSUM options#2931
TusharMohapatra07 wants to merge 2 commits into
checkpoint-restore:criu-devfrom
TusharMohapatra07:feat/ipv6

Conversation

@TusharMohapatra07
Copy link
Copy Markdown
Contributor

@TusharMohapatra07 TusharMohapatra07 commented Mar 3, 2026

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.

Part of #2007

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>
@TusharMohapatra07
Copy link
Copy Markdown
Contributor Author

TusharMohapatra07 commented Mar 3, 2026

cc @Snorch @avagin

@github-actions
Copy link
Copy Markdown

A friendly reminder that this PR had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant