summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-address.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-06-21 21:08:19 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-06-30 17:49:03 +0200
commit76a86ffdbee2dd9ef0f2b5338e14eb6ba7671456 (patch)
treeb4241501e3c103729fd4ace9222170a0dfd80895 /src/network/networkd-address.h
parentnetwork: make request_drop() accept NULL (diff)
downloadsystemd-76a86ffdbee2dd9ef0f2b5338e14eb6ba7671456.tar.xz
systemd-76a86ffdbee2dd9ef0f2b5338e14eb6ba7671456.zip
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.
Diffstat (limited to 'src/network/networkd-address.h')
-rw-r--r--src/network/networkd-address.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/network/networkd-address.h b/src/network/networkd-address.h
index a24320fca2..ff3d46abdd 100644
--- a/src/network/networkd-address.h
+++ b/src/network/networkd-address.h
@@ -41,12 +41,13 @@ typedef struct Address {
bool scope_set:1;
bool ip_masquerade_done:1;
+ bool is_static:1; /* currently only used by IPv4ACD */
+ bool acd_announced:1;
AddressFamily duplicate_address_detection;
+ sd_ipv4acd *acd;
/* Called when address become ready */
address_ready_callback_t callback;
-
- sd_ipv4acd *acd;
} Address;
int address_new(Address **ret);
@@ -71,10 +72,6 @@ int link_get_ipv6_address(Link *link, const struct in6_addr *address, Address **
int link_get_ipv4_address(Link *link, const struct in_addr *address, unsigned char prefixlen, Address **ret);
int manager_has_address(Manager *manager, int family, const union in_addr_union *address, bool check_ready);
-void ipv4_dad_unref(Link *link);
-int ipv4_dad_stop(Link *link);
-int ipv4_dad_update_mac(Link *link);
-
int link_request_address(
Link *link,
Address *address,