-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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)?;
}
...Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Ready to release