f-42: e2e: 46-passerelle-nat, nettoyage des passerelles par le harnais #42
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
2737b61bc4
commit
2a5ea40cdc
4 changed files with 166 additions and 11 deletions
|
|
@ -126,6 +126,8 @@ def match(kind, a, f):
|
|||
return t == b'\x08\x06' and f[20:22] == b'\x00\x01' and f[38:42] == ipb(a[0])
|
||||
if kind == 'arp-from':
|
||||
return t == b'\x08\x06' and f[28:32] == ipb(a[0])
|
||||
if kind == 'icmp-from':
|
||||
return t == b'\x08\x00' and f[23] == 1 and f[26:30] == ipb(a[0])
|
||||
if kind == 'udp-from':
|
||||
return t == b'\x08\x00' and f[23] == 17 and f[26:30] == ipb(a[0]) and struct.unpack('!H', f[34:36])[0] == int(a[1])
|
||||
if kind == 'marker':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue