Project

General

Profile

Bug #3857

is_port() validate a wrong port range

Added by Renato Botelho almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
Normal
Category:
Rules/NAT
Target version:
Start date:
09/10/2014
Due date:
% Done:

100%

Estimated time:
Affected Version:
All
Affected Architecture:

Description

is_port() function should validate only a single port since there is is_portrange() available, but it actually validate a range of ports, but it does it wrong and consider '1025:1027:1029' as a valid range. It can break pf rules if you add a port alias with value like this.

Associated revisions

Revision 9060f420 (diff)
Added by Renato Botelho almost 4 years ago

Change is_port() to only validate a single port, we have is_portrange() for specific cases. Make necessary adjustments after check all is_port() calls. It fixes #3857

History

#1 Updated by Renato Botelho almost 4 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#2 Updated by Thiago Basilio almost 4 years ago

Test OK for range 1025:1027:1029.

But if you supply a port range with the ending port containing a lower value than the initial port (say, "1025:1023"), it is allowed.

,,,,,,,,,,,,,,,,,,,,,,,,,
pfSense 2.2-BETA amd64
Firefox ESR 24.8.0 win32
`````````````````````````

#3 Updated by Renato Botelho almost 4 years ago

  • Status changed from Feedback to Resolved

It's expected

Also available in: Atom PDF