mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Add support for CIDR subnets
This commit is contained in:
parent
b7a99b2234
commit
c587b35a3c
@ -204,8 +204,14 @@ def refreshShapers():
|
|||||||
if device['ipv4']:
|
if device['ipv4']:
|
||||||
parentString = str(major) + ':'
|
parentString = str(major) + ':'
|
||||||
flowIDstring = str(major) + ':' + str(minor)
|
flowIDstring = str(major) + ':' + str(minor)
|
||||||
print(tabs + ' ', end='')
|
if '/' in device['ipv4']:
|
||||||
shell('./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --add --ip ' + device['ipv4'] + ' --cpu ' + str(queue-1) + ' --classid ' + flowIDstring)
|
hosts = list(ipaddress.ip_network(device['ipv4']).hosts())
|
||||||
|
for host in hosts:
|
||||||
|
print(tabs + ' ', end='')
|
||||||
|
shell('./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --add --ip ' + str(host) + ' --cpu ' + str(queue-1) + ' --classid ' + flowIDstring)
|
||||||
|
else:
|
||||||
|
print(tabs + ' ', end='')
|
||||||
|
shell('./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --add --ip ' + device['ipv4'] + ' --cpu ' + str(queue-1) + ' --classid ' + flowIDstring)
|
||||||
device['qdisc'] = flowIDstring
|
device['qdisc'] = flowIDstring
|
||||||
if device['hostname'] not in devicesShaped:
|
if device['hostname'] not in devicesShaped:
|
||||||
devicesShaped.append(device['hostname'])
|
devicesShaped.append(device['hostname'])
|
||||||
|
Loading…
Reference in New Issue
Block a user