Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network/dhcp: add IPv6 only mode support #29472

Merged
merged 5 commits into from
Oct 12, 2023

Conversation

yuwata
Copy link
Member

@yuwata yuwata commented Oct 6, 2023

split-out of #29063.
replaces #28950.

@yuwata
Copy link
Member Author

yuwata commented Oct 6, 2023

@ssahani Sorry for late. Finally I added several test cases. The basic implementation for DHCP server side is equivalent to yours. But the implementation for the client side is quite different. Please take a look.

@yuwata yuwata force-pushed the network-dhcp-ipv6-only-mode branch 2 times, most recently from 8b28148 to 51a8394 Compare October 6, 2023 13:04
@yuwata yuwata marked this pull request as ready for review October 6, 2023 13:15
@yuwata yuwata added new-feature please-review PR is ready for (re-)review by a maintainer labels Oct 6, 2023
@yuwata yuwata force-pushed the network-dhcp-ipv6-only-mode branch 2 times, most recently from dbacd59 to bd095ff Compare October 7, 2023 06:27
@ssahani
Copy link
Contributor

ssahani commented Oct 7, 2023

Looks pretty good. Thanks a ton working on this.

@yuwata
Copy link
Member Author

yuwata commented Oct 7, 2023

CentOS CI failure is unrelated (TEST-50-DISSECT).

@yuwata yuwata force-pushed the network-dhcp-ipv6-only-mode branch from bd095ff to 38e24d5 Compare October 9, 2023 05:32
@poettering poettering added good-to-merge/with-minor-suggestions and removed please-review PR is ready for (re-)review by a maintainer labels Oct 9, 2023
@yuwata yuwata force-pushed the network-dhcp-ipv6-only-mode branch from 38e24d5 to 4094215 Compare October 11, 2023 06:14
@yuwata
Copy link
Member Author

yuwata commented Oct 11, 2023

@poettering Thank you for the review. Addressed the above suggestions. Upgrading the green label.

@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed good-to-merge/with-minor-suggestions labels Oct 11, 2023
@bluca bluca added ci-fails/needs-rework 🔥 Please rework this, the CI noticed an issue with the PR and removed good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Oct 11, 2023
@yuwata yuwata added the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Oct 11, 2023
ssahani and others added 5 commits October 11, 2023 21:42
This makes sd-dhcp-server send IPv6 only preferred option (RFC 8925).

Co-authored-by: Yu Watanabe <[email protected]>
This makes sd-dhcp-client optionally request IPv6 only preferred
option (RFC 8925).
For [DHCPv4] IPv6OnlyMode= and [DHCPServer] IPv6OnlyPreferredSec=.
@yuwata yuwata force-pushed the network-dhcp-ipv6-only-mode branch 2 times, most recently from 2b06738 to 46f2eb5 Compare October 11, 2023 12:48
@yuwata yuwata merged commit 9a551cc into systemd:main Oct 12, 2023
46 checks passed
@yuwata yuwata deleted the network-dhcp-ipv6-only-mode branch October 12, 2023 04:06
@github-actions github-actions bot removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Oct 12, 2023
@evverx
Copy link
Member

evverx commented Oct 12, 2023

Looks like in IPv6-only mode networkctl renew iface leads to assert_return

systemd-networkd[350]: Assertion 'sd_dhcp_client_is_running(client)' failed at src/libsystemd-network/sd-dhcp-client.c:2158, function sd_dhcp_client_send_renew(). Ignoring.

It's expected that it should fail but I'm not sure it should look like this.

yuwata added a commit to yuwata/systemd that referenced this pull request Oct 12, 2023
@yuwata
Copy link
Member Author

yuwata commented Oct 12, 2023

@evverx Thanks. Fix is waiting in #29544.

@evverx

This comment was marked as resolved.

@evverx

This comment was marked as resolved.

@zajdee zajdee mentioned this pull request Oct 22, 2023
bluca pushed a commit to bluca/systemd-stable that referenced this pull request Nov 9, 2023
…e client is stopped

Follow-up for fc35a9f.

Fixes the issue systemd/systemd#29472 (comment).

(cherry picked from commit 9bd91e3)
bluca pushed a commit to bluca/systemd-stable that referenced this pull request Nov 9, 2023
…e client is stopped

Follow-up for fc35a9f.

Fixes the issue systemd/systemd#29472 (comment).

(cherry picked from commit 9bd91e3)
bluca pushed a commit to systemd/systemd-stable that referenced this pull request Nov 9, 2023
…e client is stopped

Follow-up for fc35a9f.

Fixes the issue systemd/systemd#29472 (comment).

(cherry picked from commit 9bd91e3)
bluca pushed a commit to bluca/systemd-stable that referenced this pull request Nov 9, 2023
…e client is stopped

Follow-up for fc35a9f.

Fixes the issue systemd/systemd#29472 (comment).

(cherry picked from commit 9bd91e3)
(cherry picked from commit f453cbc)
bluca pushed a commit to systemd/systemd-stable that referenced this pull request Nov 9, 2023
…e client is stopped

Follow-up for fc35a9f.

Fixes the issue systemd/systemd#29472 (comment).

(cherry picked from commit 9bd91e3)
(cherry picked from commit f453cbc)
bluca pushed a commit to bluca/systemd-stable that referenced this pull request Nov 9, 2023
…e client is stopped

Follow-up for fc35a9f.

Fixes the issue systemd/systemd#29472 (comment).

(cherry picked from commit 9bd91e3)
(cherry picked from commit f453cbc)
(cherry picked from commit 073d2db)
bluca pushed a commit to systemd/systemd-stable that referenced this pull request Nov 10, 2023
…e client is stopped

Follow-up for fc35a9f.

Fixes the issue systemd/systemd#29472 (comment).

(cherry picked from commit 9bd91e3)
(cherry picked from commit f453cbc)
(cherry picked from commit 073d2db)
ssahani pushed a commit to ssahani/systemd that referenced this pull request Nov 23, 2023
bluca pushed a commit to bluca/systemd-stable that referenced this pull request Dec 6, 2023
…e client is stopped

Follow-up for fc35a9f.

Fixes the issue systemd/systemd#29472 (comment).

(cherry picked from commit 9bd91e3)
(cherry picked from commit f453cbc)
(cherry picked from commit 073d2db)
@Leseratte10
Copy link

Leseratte10 commented Dec 30, 2023

As I already commented over at #23674 , I'm not 100% sure if this current implementation matches the RFC8925 spec.

The RFC says that this parameter should be sent by "IPv6-only-capable hosts", and defines that term with the following description:

IPv6-only-capable host: A host that does not require an IPv4 address and can operate on IPv6-only networks. More precisely, IPv6-only capability is specific to a given interface of the host: if some applications on a host require IPv4 and the 464XLAT CLAT (customer-side translator) [RFC6877] is only enabled on one interface, the host is IPv6-only capable if connected to a NAT64 network via that interface.

This sounds to me like this flag should only be advertised on hosts that are only running IPv6-capable software, or on hosts running a 464XLAT (#23674). By turning this flag on by default, this means that any Linux machine with systemd, running in a network that uses / supports that flag, the Linux machine will not request an IPv4 from the DHCP server, breaking all functionality for IPv4-only applications.

According to the RFC, if I'm interpreting it correctly, this parameter should only be sent when there's a working 464XLAT (or when the administrator is 100% sure there's only IPv6-capable software on the machine and manually turns it on, but not by default). Can this be updated to switch the default value for IPv6OnlyMode back to False until 464XLAT is implemented and available?

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

Successfully merging this pull request may close these issues.

6 participants