coreos / go-iptables

Go wrapper around iptables utility
Apache License 2.0
1.11k stars 257 forks source link

StructuredStats fails to parse negated source/dest CIDRs #109

Open jroper opened 1 year ago

jroper commented 1 year ago

I have the following chain:

target     prot opt source               destination         
RETURN     all  --  anywhere             192.168.0.0/16      
RETURN     all  --  anywhere             172.16.0.0/12       
RETURN     all  --  anywhere            !127.0.0.0/8    

Invoking StructuredStats returns the following error:

invalid CIDR address: !127.0.0.0/8%!(EXTRA string=could not parse destination)
itsmomchilovtsi commented 9 months ago

try out this lib: https://github.com/singchia/go-xtables