You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The port qualifier accepts either a number or a name, and the name must match the protocol if a protocol is specified (this is what "If a name is used, both the port number and protocol are checked." means, as far as I understand):
$ ./testprogs/filtertest IPV4 udp port http
filtertest: port 'http' is tcp
Likewise, the portrange qualifier also accepts a number or a name for either of its two arguments and seems to follow the same logic, but not quite entirely:
port 25 works as expected
port smtp works as expected
portrange 25 works (undocumented syntax)
portrange smtp returns an error ("port range 'smtp' contains no hyphen")
portrange 25-25 works as expected
portrange 25-smtp works as expected
portrange smtp-25 works as expected
portrange smtp-smtp works as expected
udp port 25 works as expected
udp port smtp returns an error as expected ("port 'smtp' is tcp")
udp portrange 25 works (undocumented syntax)
udp portrange smtp returns an error about a missing hyphen, not an error about protocol mismatch
udp portrange 25-25 works as expected
udp portrange 25-smtp compiles without an error, which is a failure to fail
udp portrange smtp-25 compiles without an error, which is a failure to fail
udp portrange smtp-smtp returns an error as expected ("port in range 'smtp-smtp' is tcp")
udp portrange smtp-domain compiles without an error, which is a failure to fail
The text was updated successfully, but these errors were encountered:
The
port
qualifier accepts either a number or a name, and the name must match the protocol if a protocol is specified (this is what "If a name is used, both the port number and protocol are checked." means, as far as I understand):Likewise, the
portrange
qualifier also accepts a number or a name for either of its two arguments and seems to follow the same logic, but not quite entirely:port 25
works as expectedport smtp
works as expectedportrange 25
works (undocumented syntax)portrange smtp
returns an error ("port range 'smtp' contains no hyphen")portrange 25-25
works as expectedportrange 25-smtp
works as expectedportrange smtp-25
works as expectedportrange smtp-smtp
works as expectedudp port 25
works as expectedudp port smtp
returns an error as expected ("port 'smtp' is tcp")udp portrange 25
works (undocumented syntax)udp portrange smtp
returns an error about a missing hyphen, not an error about protocol mismatchudp portrange 25-25
works as expectedudp portrange 25-smtp
compiles without an error, which is a failure to failudp portrange smtp-25
compiles without an error, which is a failure to failudp portrange smtp-smtp
returns an error as expected ("port in range 'smtp-smtp' is tcp")udp portrange smtp-domain
compiles without an error, which is a failure to failThe text was updated successfully, but these errors were encountered: