network: ipv4acd: first probe address and then assign it

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 #17235.
This commit is contained in:
Yu Watanabe
2021-07-01 00:49:03 +09:00
parent 475ec3346f
commit 76a86ffdbe
8 changed files with 328 additions and 344 deletions
+10
View File
@@ -0,0 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
typedef struct Address Address;
typedef struct Link Link;
int ipv4acd_address_is_ready_to_configure(Link *link, const Address *address);
int ipv4acd_update_mac(Link *link);
int ipv4acd_start(Link *link);
int ipv4acd_stop(Link *link);