opnsense-src/sbin
Kajetan Staszkiewicz d2761422eb pf: Use different address family for source and redirection address
The function pf_map_addr() and source tracking operate on a single
address family. This made sense before introducing address family
translation. When combining af-to with route-to or with sticky-address,
the next-hop or the NAT address are of different address family than
the source address. For example in NAT64 scenaro an IPv6 source address
is translated to an IPv4 address and routed over IPv4 gateway.

Make source nodes dual-AF, that is have a separate source AF and
redirection AF. Store route AF in struct pf_kstate, export it to pfctl.
When loading rules with redirection pools with pfctl store address
family of each address. When printing states don't deduce next-hop's
address family from af-to, use the one stored in state.

Reviewed by:	kp
Approved by:	kp
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D51659
2025-08-01 12:11:30 +02:00
..
adjkerntz adjkerntz.8: minor cleanup (markup, spdx, reflow) 2024-07-29 14:06:06 -06:00
bectl bectl.8: Describe better 2025-07-10 18:35:36 -04:00
bsdlabel bsdlabel.8: Don't document how to create vinum partitions 2025-01-23 11:20:43 -05:00
camcontrol ufshci: camcontrol: use correct define to fix the build 2025-06-15 09:25:56 +00:00
ccdconfig ccdconfig.8: Bump Dd for gvinum removal 2025-01-23 11:20:43 -05:00
clri Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
comcontrol manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
conscontrol Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
ddb Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
decryptcore Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
devd devd/moused.conf: Stop moused quietly on destroy of a ums device 2025-07-25 10:50:34 -06:00
devfs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
devmatch devmatch: Catch truncated linker hints files 2024-10-23 22:12:45 +00:00
dhclient base: do a sweep of setgroups() that mean to clear the supplementaries 2025-07-26 01:11:58 -05:00
dmesg Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
dump Standardize the definition of a UFS dinode. 2025-01-27 17:39:45 -08:00
dumpfs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
dumpon dumpon: Move the _Noreturn keyword before the return type 2025-01-09 13:07:51 -05:00
etherswitchcfg Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fdisk fdisk: Remove support for vinum volumes 2025-01-23 11:20:43 -05:00
ffsinfo Remove references to gvinum(8) in various manpages 2025-01-23 13:16:47 -05:00
fsck Move mntopts(3) suppport into libutil 2025-04-22 22:51:42 +01:00
fsck_ffs fsck_ffs: change struct bufarea member b_index type to uint64_t 2025-05-27 03:42:03 +03:00
fsck_msdosfs msdosfs manuals: Improve visibility and linking 2025-04-17 12:39:13 -04:00
fsdb sbin: Remove ancient SCCS tags. 2023-11-26 22:23:29 -07:00
fsirand Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00
geom gvinum(8): Remove userland tool for managing vinum volumes 2025-01-23 11:20:43 -05:00
ggate manuals: Fix "skipping end of block" .Ed errors 2024-10-03 14:49:23 -03:00
growfs growfs(8): use gpart(8) instead of bsdlabel(8) in test 2025-06-17 23:21:20 -08:00
hastctl Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-07-30 12:16:36 -04:00
hastd Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-07-30 12:16:36 -04:00
ifconfig ifconfig: fix removing IPv6 addresses 2025-07-29 15:13:09 +02:00
init Search for mntopts.h globally, not locally 2025-04-22 22:51:42 +01:00
ipf ipfilter: End (cleanup) the iterative search key 2025-07-07 16:37:07 -07:00
ipfw ipfw: Fix broken length checks on routing messages 2025-04-21 22:00:14 -04:00
kldconfig sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
kldload Add kenv .Xr in kldload(8) and loader.conf(5) 2023-12-20 21:17:38 -07:00
kldstat kldstat: Memory zeroing using memset() 2025-07-18 09:30:52 -06:00
kldunload sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
ldconfig Canonicalize the name of the FreeBSD Foundation 2024-10-24 05:03:07 +08:00
md5 Update Makefile.depend files 2024-10-14 10:26:17 -07:00
mdconfig Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mdmfs Ensure that soft updates are not enabled by default when using mdmfs(8) 2024-10-03 08:06:28 -07:00
mknod Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
mksnap_ffs Move mntopts(3) suppport into libutil 2025-04-22 22:51:42 +01:00
mount manpages: prefer linking to xo_options.7 over xo_parse_args.3 2025-07-16 12:02:24 -06:00
mount_cd9660 Search for mntopts.h globally, not locally 2025-04-22 22:51:42 +01:00
mount_fusefs Replace last few remaining MAN[1-8] with MAN 2025-07-26 12:00:02 +02:00
mount_msdosfs Search for mntopts.h globally, not locally 2025-04-22 22:51:42 +01:00
mount_nfs Search for mntopts.h globally, not locally 2025-04-22 22:51:42 +01:00
mount_nullfs Search for mntopts.h globally, not locally 2025-04-22 22:51:42 +01:00
mount_udf Search for mntopts.h globally, not locally 2025-04-22 22:51:42 +01:00
mount_unionfs Search for mntopts.h globally, not locally 2025-04-22 22:51:42 +01:00
natd natd: Enable support for EIM NAT 2024-12-06 09:21:06 +00:00
newfs newfs: don't warn() when newfs'ing plain file 2025-06-03 08:50:58 -08:00
newfs_msdos msdosfs manuals: Improve visibility and linking 2025-04-17 12:39:13 -04:00
nfsiod Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
nos-tun sbin/nos-tun: correct SIOCDIFADDR calls to use ifreq 2024-07-22 09:58:37 +00:00
nvmecontrol nvmf: Auto-reconnect periodically after a disconnect 2025-07-09 10:19:45 -04:00
pfctl pf: Use different address family for source and redirection address 2025-08-01 12:11:30 +02:00
pfilctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pflogd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pflowctl Update Makefile.depend files 2024-10-14 10:26:17 -07:00
ping ping: Remove unnecessary compiler flag 2025-07-30 16:19:34 +02:00
quotacheck Standardize the definition of a UFS dinode. 2025-01-27 17:39:45 -08:00
rcorder rcorder(8): Fix grammar 2024-02-13 16:36:05 +08:00
reboot reboot(8): add support for noshutdown 2025-07-22 12:22:06 +03:00
recoverdisk recoverdisk(1): Change time variables to time_t to compile on i386 2025-07-30 15:28:02 +00:00
resolvconf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
restore Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
route route: fix route -n monitor when its output is redirected 2025-07-17 12:17:01 -05:00
routed deprecate RIP 2025-07-07 00:23:41 +01:00
rtsol Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
savecore manpages: prefer linking to xo_options.7 over xo_parse_args.3 2025-07-16 12:02:24 -06:00
setkey setkey(8): document -hwif extension 2024-08-25 17:46:09 +03:00
shutdown shutdown(8): refuse to run if /var/run/noshutdown is present 2025-05-05 19:04:22 +03:00
swapon swapon: Improve tests for non-standard kernel page size and small media 2025-07-31 02:23:13 +02:00
sysctl sysctl_test: Print standard error if sysctl -ao fails 2025-07-08 12:56:00 +00:00
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
tunefs Move mntopts(3) suppport into libutil 2025-04-22 22:51:42 +01:00
umbctl umb: Introduce the USB umb(4) network driver 2025-01-20 23:46:15 +00:00
umount manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
veriexec The exec(2) man page does not exist; refer to execve(2) which does. 2025-04-19 20:36:21 +02:00
zfsbootcfg zfsboot: Remove zfsboot(8) program used to boot ZFS from MBR + BIOS 2025-07-28 10:58:02 -04:00
Makefile gvinum(8): Remove userland tool for managing vinum volumes 2025-01-23 11:20:43 -05:00
Makefile.amd64 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.arm Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.i386 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.inc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.powerpc64 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00