HomeFreeBSD

pf: cope with IPv6 gateways for an IPv4 route in nat64

Description

pf: cope with IPv6 gateways for an IPv4 route in nat64

It's possible for an IPv4 next hop to be specified as an IPv6 address. This
broke pf's route lookup in pf_route(), which is required for nat64.

Handle this case just like ip_tryforward(): use the struct sockaddr from the
struct nhop_object, and mark a struct route to indicate if_output() has to use
the gateway.

Add a test case for this.

PR: 284946
Reviewed by: zlei
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D49095

Details

Provenance
kpAuthored on Fri, Feb 21, 3:49 PM
Reviewer
zlei
Differential Revision
D49095: pf: cope with IPv6 gateways for an IPv4 route in nat64
Parents
rG9bdb3272f753: pf tests: remove stray debug log line
Branches
Unknown
Tags
Unknown