mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-22 08:16:25 -06:00
Fix a subtle bug that when squashing sites that only have one decendent, speeds were being applied incorrectly.
This commit is contained in:
parent
779ef162d3
commit
20a7e3512d
@ -60,6 +60,7 @@ impl IpRanges {
|
||||
|
||||
/// Checks if an IP address is permitted.
|
||||
pub fn is_permitted(&self, ip: IpAddr) -> bool {
|
||||
//println!("Checking: {:?}", ip);
|
||||
if let Some(_allow) = self.allowed.longest_match(ip) {
|
||||
if let Some(_deny) = self.ignored.longest_match(ip) {
|
||||
return false;
|
||||
|
@ -34,8 +34,8 @@ pub fn squash_single_aps(sites: &mut [UispSite]) -> Result<(), UispIntegrationEr
|
||||
if s.parent_indices.contains(&squash_idx) {
|
||||
s.parent_indices.remove(&squash_idx);
|
||||
s.parent_indices.insert(new_parent);
|
||||
s.max_up_mbps = up;
|
||||
s.max_down_mbps = down;
|
||||
s.max_up_mbps = u32::min(up, s.max_up_mbps);
|
||||
s.max_down_mbps = u32::min(down, s.max_down_mbps);
|
||||
}
|
||||
});
|
||||
sites[squash_idx].parent_indices.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user