network: set broadcast address on request
Previously, the broadcast address was set to a Address object in address_section_verify() (or address_acquire()). But, for wireguard interfaces, we do not use the broadcast address. The .network file may be assigned to multiple interfaces, hence, we cannot determine if we should set the broadcast address in address_section_verify(). This makes the broadcast address set in link_request_address(). Then, we set the broadcast address only when we need it.
This commit is contained in:
@@ -106,7 +106,7 @@ int link_request_dhcp_server_address(Link *link) {
|
||||
address->family = AF_INET;
|
||||
address->in_addr.in = link->network->dhcp_server_address;
|
||||
address->prefixlen = link->network->dhcp_server_address_prefixlen;
|
||||
address_set_broadcast(address);
|
||||
address_set_broadcast(address, link);
|
||||
|
||||
if (address_get(link, address, &existing) >= 0 &&
|
||||
address_exists(existing) &&
|
||||
|
||||
Reference in New Issue
Block a user