Account for /32s earlier

This commit is contained in:
Robert Chacón 2022-09-07 05:25:46 -06:00 committed by GitHub
parent a7bfe5e915
commit 3bef6fa7c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,7 +121,10 @@ def refreshShapers():
elif '/' in ipEntry:
theseHosts = ipaddress.ip_network(ipEntry).hosts()
for host in theseHosts:
ipv4_hosts.append(str(host))
host = str(host)
if '/32' in host:
host = host.replace('/32','')
ipv4_hosts.append(host)
else:
ipv4_hosts.append(ipEntry)
ipv6_hosts = []
@ -354,8 +357,6 @@ def refreshShapers():
for device in circuit['devices']:
if device['ipv4s']:
for ipv4 in device['ipv4s']:
if '/32' in ipv4:
ipv4 = ipv4.replace('/32','')
print(tabs + ' ', end='')
shell('./xdp-cpumap-tc/src/xdp_iphash_to_cpu_cmdline --add --ip ' + str(ipv4) + ' --cpu ' + hex(queue-1) + ' --classid ' + flowIDstring)
if device['deviceName'] not in devicesShaped: