HomeFreeBSD

tcp/ipfw: fix "ipfw fwd localaddr,port"

Description

tcp/ipfw: fix "ipfw fwd localaddr,port"

The ipfw(4) feature of forwarding to local address without modifying
a packet was broken. The first lookup needs always be a non-wildcard
one, cause its goal is to find an already existing socket. Otherwise
a local wildcard listener with the same port number may match resulting
in the connection being forwared to wrong port.

Reported by: Pavel Polyakov <bsd kobyla.org>
Fixes: d88eb4654f372d0451139a1dbf525a8f2cad1cf8

Details

Provenance
glebiusAuthored on Jan 5 2023, 10:34 PM
Parents
rGc47015fafa48: bsd-family-tree: add DragonFly 6.4.0
Branches
Unknown
Tags
Unknown