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
MFC after: 1 week
PR: 256828, 261697, 255705
Differential Revision: https://reviews.freebsd.org/D34732

Details

Provenance
aeAuthored on Apr 1 2022, 1:49 PM
Differential Revision
D34732: Fix ipfw fwd that doesn't work in some cases
Parents
rG4763c0aa68a7: ipfw: fix matching and setting DSCP value for IPv6
Branches
Unknown
Tags
Unknown