Skip to content

feat(net): expose IPv6 address generation mode via rtnetlink - #2714

Merged
fslongjin merged 2 commits into
DragonOS-Community:masterfrom
fslongjin:codex/feat-ipv6-addrgen-rtnl-2324-50
Nov 25, 2026
Merged

fslongjin merged 2 commits into
DragonOS-Community:masterfrom
fslongjin:codex/feat-ipv6-addrgen-rtnl-2324-50

Conversation

@fslongjin

Copy link
Copy Markdown
Member

Summary

  • Support IPv6 address-generation mode in ordinary RTM_SETLINK and RTM_NEWLINK updates. Include the mode in link queries and notifications.
  • Apply the AF operation after the existing link and master operations. Preserve the outcome of earlier operations when the IPv6 configuration disappears during the update.
  • Separate address-mode storage from address initialization. Evaluate the previous mode when a device becomes synchronously ready and use the updated mode for deferred carrier. Keep sysctl-triggered address initialization unchanged.

This covers the EUI-64 and none RTNL modes for the Docker firewall acceptance work tracked by #2324. Stable privacy and random generation are follow-up work.

Validation

  • Compared raw SETLINK and NEWLINK, GETLINK, repeat notifications, and low-MTU partial updates with Linux.
  • Passed the kernel build, format checks, and the RTNL regression suite.
  • Verified mode-only writes, deferred veth and bridge carrier, and synchronous virtio link notifications in QEMU.
  • Passed QEMU networking regressions and both native nftables and iptables-nft Docker IPv6 matrices with the userland proxy disabled.

Read and update the IPv6 address generation mode through IFLA_AF_SPEC. Validate the original IPv6 device before changing the link, apply the mode after link and master changes, and preserve the earlier commit when lowering the MTU removes its IPv6 configuration.

Evaluate synchronously ready Ethernet devices after notifying link changes and before applying a new mode. Keep peer-derived carrier evaluation deferred so veth and bridge transitions use the new mode.

Cover raw SETLINK and NEWLINK, GETLINK, repeat notifications, and low-MTU partial updates in the rtnetlink regression suite.

Signed-off-by: longjin <longjin@dragonos.org>
@fslongjin

Copy link
Copy Markdown
Member Author

@codex review

@github-actions github-actions Bot added the enhancement New feature or request label Nov 25, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T09:12:53.242248Z 8eecfb2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a628a1db30

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread kernel/src/net/address/ipv6_autoconf.rs Resolved
An empty bridge retains its carrier state across administrative updates. Evaluate IPv6 address generation before applying a new RTNL mode when that carrier is ready. Preserve deferred evaluation for bridges whose carrier comes from member ports and keep the readiness check after the last port is removed.

Cover both address generation mode transitions on an empty bridge in the rtnetlink regression suite.

Signed-off-by: longjin <longjin@dragonos.org>
@fslongjin

Copy link
Copy Markdown
Member Author

@codex review

@fslongjin
fslongjin merged commit 3185c5c into DragonOS-Community:master Nov 25, 2026
20 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 8eecfb22c5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant