Skip to content

Commit

Permalink
fix disappearing network devices
Browse files Browse the repository at this point in the history
  • Loading branch information
t-aleksander committed Dec 20, 2024
1 parent 95dc81a commit c7eab4f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/db/models/wireguard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,11 @@ impl WireguardNetwork<Id> {
) -> Result<Vec<GatewayEvent>, WireguardNetworkError> {
info!("Synchronizing IPs in network {self} for all allowed devices ");
// list all allowed devices
let allowed_devices = self.get_allowed_devices(&mut *transaction).await?;
let mut allowed_devices = self.get_allowed_devices(&mut *transaction).await?;
// network devices are always allowed
let network_devices = Device::find_by_type(&mut *transaction, DeviceType::Network).await?;
allowed_devices.extend(network_devices);

// convert to a map for easier processing
let mut allowed_devices: HashMap<Id, Device<Id>> = allowed_devices
.into_iter()
Expand Down

0 comments on commit c7eab4f

Please sign in to comment.