HomeFreeBSD

Fix ipfw fwd that doesn't work in some cases

Description

Fix ipfw fwd that doesn't work in some cases

For IPv4 use dst pointer as destination address in fib4_lookup().
It keeps destination address from IPv4 header and can be changed
when PACKET_TAG_IPFORWARD tag was set by packet filter.

For IPv6 override destination address with address from dst_sa.sin6_addr,
that was set from PACKET_TAG_IPFORWARD tag.

Reviewed by: eugen
PR: 256828, 261697, 255705
Differential Revision: https://reviews.freebsd.org/D34732

(cherry picked from commit 7d98cc096b995ca3bfd85277ed009b0f872c3e1b)

Details

Provenance
aeAuthored on Apr 1 2022, 1:49 PM
Differential Revision
D34732: Fix ipfw fwd that doesn't work in some cases
Parents
rGf66bb161ab7a: modules: fix mii build
Branches
Unknown
Tags
Unknown