Skip to content

agama-network: add ipv4.link-local for ZeroConf/AutoIP#2792

Merged
teclator merged 2 commits intoagama-project:masterfrom
cfconrad:add_ipconfig_link_local4
Oct 10, 2025
Merged

agama-network: add ipv4.link-local for ZeroConf/AutoIP#2792
teclator merged 2 commits intoagama-project:masterfrom
cfconrad:add_ipconfig_link_local4

Conversation

@cfconrad
Copy link
Copy Markdown
Contributor

@cfconrad cfconrad commented Oct 7, 2025

Add the field IpConfig.link_local4, which represent NetworkManager ipv4.link-local field.

This is needed duo the migration of the following ifconfig

BOOTPROTO=dhcp+autoip

which lead to

ipv4.method=auto
ipv4.link-local=fallback (4)

Testing

  • Tested manually

@cfconrad cfconrad force-pushed the add_ipconfig_link_local4 branch 2 times, most recently from f97bd7f to e80c62a Compare October 7, 2025 10:58
@cfconrad cfconrad force-pushed the add_ipconfig_link_local4 branch from e80c62a to 4e5ba1c Compare October 7, 2025 11:37
Copy link
Copy Markdown
Contributor

@teclator teclator left a comment

Choose a reason for hiding this comment

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

LGTM

@cfconrad cfconrad marked this pull request as draft October 9, 2025 07:44
let link_local = if ip_config.link_local4 == LinkLocal::Fallback
&& VersionReq::parse("<1.52.0").unwrap().matches(nm_version)
{
LinkLocal::Auto
Copy link
Copy Markdown
Contributor Author

@cfconrad cfconrad Oct 9, 2025

Choose a reason for hiding this comment

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

Just realized, that link-local=auto with ipv4.method=auto will not use zeroconf in addition to DHCP on the interface. As link-local=auto actually mean, use the value from ipv4.method.

Change this to link-local=enabled, then we have a AutoIP and the DHCPv4 address. So the difference between the NetworkManager versions is

<1.52: The interface will always have a zeroconf IP address, ALSO after DHCP
>=1.52: The zeroconf IP-Address will be removed, once the DHCP lease is applied

Sorry for the late noise!

Add the field IpConfig.link_local4, which represent
NetworkManager `ipv4.link-local` field.

This is needed duo the migration of the following ifconfig
```
BOOTPROTO=dhcp+autoip
```
which lead to
```
ipv4.method=auto
ipv4.link-local=fallback (4)
```
@cfconrad cfconrad force-pushed the add_ipconfig_link_local4 branch from 4e5ba1c to 4adb47a Compare October 9, 2025 07:46
@cfconrad cfconrad marked this pull request as ready for review October 9, 2025 07:47
Copy link
Copy Markdown
Contributor

@teclator teclator left a comment

Choose a reason for hiding this comment

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

LGTM

@coveralls
Copy link
Copy Markdown

coveralls commented Oct 10, 2025

Coverage Status

coverage: 63.577% (-0.01%) from 63.588%
when pulling 2ab4add on cfconrad:add_ipconfig_link_local4
into 8a724db on agama-project:master.

@cfconrad cfconrad force-pushed the add_ipconfig_link_local4 branch from 4adb47a to 2ab4add Compare October 10, 2025 10:59
Copy link
Copy Markdown
Contributor

@teclator teclator left a comment

Choose a reason for hiding this comment

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

LGTM

@teclator teclator merged commit 07fb25d into agama-project:master Oct 10, 2025
8 of 9 checks passed
@cfconrad cfconrad deleted the add_ipconfig_link_local4 branch October 10, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants