HomeFreeBSD

ipfw: unbreak matching with big table type flow.

Description

ipfw: unbreak matching with big table type flow.

Test case:

  1. n=32769
  2. ipfw -q table 1 create type flow:proto,dst-ip,dst-port
  3. jot -w 'table 1 add tcp,127.0.0.1,' $n 1 | ipfw -q /dev/stdin
  4. ipfw -q add 5 unreach filter-prohib flow 'table(1)'

The rule 5 matches nothing without the fix if n>=32769.

With the fix, it works:

telnet localhost 10001

Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Permission denied
telnet: Unable to connect to remote host

MFC after: 2 weeks
Discussed with: ae, melifaro

Details

Provenance
eugenAuthored on
Parents
rS361788: superio: do not assume that current LDN cannot change after config exit
Branches
Unknown
Tags
Unknown