mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
network: do not require DHCPv6 addresses when UseAddress=no
Follow-up for 1536b7b2d0
.
Fixes #19196.
This commit is contained in:
parent
708b299203
commit
8cd37e4354
@ -25,6 +25,13 @@
|
||||
#include "radv-internal.h"
|
||||
#include "web-util.h"
|
||||
|
||||
bool link_dhcp6_with_address_enabled(Link *link) {
|
||||
if (!link_dhcp6_enabled(link))
|
||||
return false;
|
||||
|
||||
return link->network->dhcp6_use_address;
|
||||
}
|
||||
|
||||
bool link_dhcp6_pd_is_enabled(Link *link) {
|
||||
assert(link);
|
||||
|
||||
|
@ -26,6 +26,7 @@ typedef struct DHCP6DelegatedPrefix {
|
||||
DHCP6DelegatedPrefix *dhcp6_pd_free(DHCP6DelegatedPrefix *p);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(DHCP6DelegatedPrefix*, dhcp6_pd_free);
|
||||
|
||||
bool link_dhcp6_with_address_enabled(Link *link);
|
||||
bool link_dhcp6_pd_is_enabled(Link *link);
|
||||
int dhcp6_pd_remove(Link *link);
|
||||
int dhcp6_configure(Link *link);
|
||||
|
@ -779,7 +779,7 @@ void link_check_ready(Link *link) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((link_dhcp4_enabled(link) || link_dhcp6_enabled(link) || link_ipv4ll_enabled(link)) &&
|
||||
if ((link_dhcp4_enabled(link) || link_dhcp6_with_address_enabled(link) || link_ipv4ll_enabled(link)) &&
|
||||
!link->dhcp_address && set_isempty(link->dhcp6_addresses) && !has_ndisc_address &&
|
||||
!link->ipv4ll_address_configured)
|
||||
/* When DHCP[46] or IPv4LL is enabled, at least one address is acquired by them. */
|
||||
|
Loading…
Reference in New Issue
Block a user