Page MenuHomeFreeBSD

[ipfw] Unbreak lookup src/dst-ip
AcceptedPublic

Authored by lytboris_gmail.com on Sat, Nov 15, 6:39 PM.
Tags
None
Referenced Files
F136170184: D53775.diff
Sun, Nov 16, 9:52 AM
F136154376: D53775.id.diff
Sun, Nov 16, 6:12 AM
F136143211: D53775.id166516.diff
Sun, Nov 16, 3:33 AM
F136140042: D53775.id.diff
Sun, Nov 16, 2:52 AM
F136140000: D53775.id166516.diff
Sun, Nov 16, 2:52 AM
F136137383: D53775.diff
Sun, Nov 16, 2:20 AM

Details

Reviewers
melifaro
Summary

There's a fallthough bug in a switch statement for lookup opcode caused by an extra else statement: legitimate IPv4 and IPv6 packets fall through to LOOKUP_DSCP case while they must exit switch.

Test Plan

Create rules

ipfw table mytable create type addr
ipfw table mytable add 192.168.0.0/16 # put your source address here
ipfw add count ip from any to any lookup src-ip mytable

Observe packets matching the rule

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped