mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
also check protocol for duplicate rules.
This commit is contained in:
parent
131b5f4f29
commit
b0da3ed7b0
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ chain = iptc.Chain(table, args.chain)
|
||||||
# Check if rule exists
|
# Check if rule exists
|
||||||
for rule in chain.rules:
|
for rule in chain.rules:
|
||||||
src_ip = rule.src
|
src_ip = rule.src
|
||||||
if src_ip.startswith(args.src_ip):
|
if src_ip.startswith(args.src_ip) and rule.protocol == args.protocol:
|
||||||
print('Rule exists')
|
print('Rule exists')
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue