-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: IPv4LL and ACD fixes #19980
Conversation
3fd3b72
to
2533069
Compare
I added this to v249 milestone. If this is too late to be included in v249, feel free to drop it. But this is slightly large, and maybe hard to backport this after v249. |
12eaca2
to
0d5df6b
Compare
0d5df6b
to
4f6cf24
Compare
4f6cf24
to
d2158fa
Compare
@poettering Thank you for your review. Now, the callback mechanisms which checks the sender hardware address is introduced to sd-ipv4acd and sd-ipv4ll. PTAL. |
9fc741a
to
a535d93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'd be inclined to merge this for 249.
src/network/networkd-ipv4acd.c
Outdated
r = address_remove(address, link); | ||
if (r < 0) { | ||
log_link_warning_errno(link, r, "Failed to remove address "IPV4_ADDRESS_FMT_STR": %m", | ||
IPV4_ADDRESS_FMT_VAL(address->in_addr.in)); | ||
link_enter_failed(link); | ||
} | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, so we remove the address if the acd client is stopped… Or in other words, we effectively add an address by creating the acd client for it, and remove it by stopping the acd client… I wonder if we should then rename things, to emphasize the "address" part and de-emphesize the "conflict detection" part. But I don't have any good suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean about the log messages? The messages in the callback function is updated. PTAL.
See RFC 5227 section 2.1.1. This introduces a callback which intend to a library user, e.g. networkd, checks whether the sender hardware address is a MAC address of the host's intrerface or not.
This also renames link_get() -> link_get_by_index().
…e the length of the hardware address is not ETH_ALEN Currently, sd-ipv4acd assumes hardware address is ETH_ALEN.
Currently, networkd does not set tentative flag on create, and kernel ignore the flag on remove. So, this commit does not change any current behaviour. This is just a preparation for later commits.
A preparation for later commits.
A preparation for later commits.
Previously, if IPv4 ACD is enabled on an address, then we first assign the address, and start sd-ipv4acd daemon for the address. This is not only RFC incompliant, but also the address is always dropped, as the daemon always considers the address is conflicted. This commit makes networkd first starts sd-ipv4acd daemon to probe the address, and then the address is configured if no conflict is detected. Fixes systemd#17235.
… for IPv4ACD and IPv4LL Fixes systemd#12145.
a535d93
to
4492443
Compare
@keszybz Thank you for your review. Force-pushed a revised version. In addition to the above points you commented, the following changes are applied.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s390x: "boot-and-services": test_service (__main__.NspawnTest) ... Failed to dump process list for 'systemd-nspawn@c1.service', ignoring: Unit systemd-nspawn@c1.service not loaded.
Looks unrelated.
LGTM, let's get this merged.
/* Unlikely, but during probing the address, the lease may be lost. */ | ||
return 0; | ||
|
||
log_link_warning(link, "Dropping DHCPv4 lease, as an address conflict is detected."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"is" → "was"
Fixes #12145.
Fixes #17235.