Affected implementations: FreeBSD, userspace.
When network-address list is modified and address is deleted, wireguard-rs leaves that address on the interface instead of removing it.
Steps to reproduce:
- Configure network with multiple addresses
- Wait for gateway to apply the configuration
- Remove one address from the configuration
- Wait for gateway to apply the configuration
Expected behavior
Gateway should unassign any address that’s been removed from its configuration.
Actual behavior
The deleted address remains assigned to the interface.
Relevant code:
Linux implementation does this before adding IPs:
...
// flush all IP addresses
debug!(
"Flushing all existing IP addresses from interface {} before assigning a new one",
self.ifname
);
netlink::flush_interface(&self.ifname)?;
...
FreeBSD and userspace don't, and add new IP's immediately:
fn configure_interface(
&self,
config: &InterfaceConfiguration,
) -> Result<(), WireguardInterfaceError> {
debug!(
"Configuring interface {} with config: {config:?}",
self.ifname
);
// Assign IP address to the interface.
for address in &config.addresses {
self.assign_address(address)?;
}
...
Affected implementations: FreeBSD, userspace.
When network-address list is modified and address is deleted, wireguard-rs leaves that address on the interface instead of removing it.
Steps to reproduce:
Expected behavior
Gateway should unassign any address that’s been removed from its configuration.
Actual behavior
The deleted address remains assigned to the interface.
Relevant code:
Linux implementation does this before adding IPs:
FreeBSD and userspace don't, and add new IP's immediately: