opnsense-src/lib
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
..
atf atf, kyua: Implement require.kmods. 2025-05-31 14:27:30 +02:00
clang clang: install clang-scan-deps 2025-07-06 22:02:52 +01:00
csu csu/tests: Add tests to verify that errno == 0 upon program startup 2025-06-24 01:24:04 +00:00
geom graid.8: fix typo 2025-04-28 10:01:30 -06:00
googletest Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
lib9p Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
lib80211 net80211: regdomain: ETSI: add missing 11a and 11na entries 2025-07-07 06:49:02 +00:00
libalias Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libarchive libarchive: fix duplicate entry in tests Makefile 2025-06-02 14:56:05 +02:00
libauditd package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
libbe bectl: Use SPDX only license 2025-06-13 15:09:22 -04:00
libbearssl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libbegemot Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libblacklist Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libblocksruntime Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libbluetooth Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
libbsddialog Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libbsdstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libbsm package: move OpenBSM auditing into its own package 2024-04-28 22:33:06 -06:00
libbsnmp libbsnmp: make binding of client UNIX socket optional and configurable 2025-07-25 13:10:17 -07:00
libbz2 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libc db/hash.c: Fix flag check in hash_seq 2025-08-01 11:33:00 +02:00
libc++ Merge llvm-project release/19.x llvmorg-19.1.3-0-gab51eccf88f5 2024-11-08 17:45:31 +01:00
libc++experimental Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00
libc_nonshared Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00
libcalendar Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcam libcam: Include nvme opcode and status code routines from nvme_util.c 2025-06-05 21:28:38 -04:00
libcapsicum manuals: Fix "skipping end of block" .Ed errors 2024-10-03 14:49:23 -03:00
libcasper cap_net/net_test: require 'allow_network_access' 2025-07-25 04:25:47 +08:00
libcbor Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libclang_rt Partially revert 6527682ab7 for llvm-based projects 2025-04-24 16:36:40 +02:00
libcom_err kerberos5, libcom_err, others: append to LDFLAGS instead of replacing 2025-04-05 14:19:57 -07:00
libcompat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libcompiler_rt libgcc_s: export integer and floating point __aeabi_ symbols 2025-05-04 13:48:32 +02:00
libcrypt lib/libcrypt: reinstate CFLAGS+=-I${SRCTOP}/sys/crypto/sha2 2024-10-26 20:11:02 +02:00
libcuse Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
libcxxrt src: Use gnu++17 as the default C++ standard 2025-04-11 09:53:50 -04:00
libder lib: hook libder up to the build 2025-01-01 15:11:06 -06:00
libdevctl manuals: Fix some "missing section argument" 2024-10-15 17:20:55 -03:00
libdevdctl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdevinfo libdevinfo: Avoid false positives for the root0 sentinel value 2025-01-29 10:03:59 -05:00
libdevstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdiff diff: Nits in tests. 2024-05-20 16:27:50 +02:00
libdl _dl_iterate_phdr_locked(): fix libc and libdl 2024-11-14 06:14:05 +02:00
libdpv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libdwarf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libedit libedit: Reset WARNS 2025-04-30 15:05:00 +02:00
libefivar efivar: Kill needless sys/cdefs.h 2025-05-25 07:49:32 -06:00
libelf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libelftc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libevent1 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libexecinfo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libexpat lib/libexpat: update build config for 2.7.1 2025-04-07 11:36:45 +08:00
libfdt libfdt: Make an internal FDT library available 2024-03-21 01:05:05 -04:00
libfetch lib: Fix calls that naively set F_SETFD. 2025-07-17 17:00:32 +00:00
libfido2 Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libfigpar Refactor error handling in lseek operations 2024-09-21 05:25:15 -06:00
libgcc_eh src: Use gnu++17 as the default C++ standard 2025-04-11 09:53:50 -04:00
libgcc_s libgcc_s: export integer and floating point __aeabi_ symbols 2025-05-04 13:48:32 +02:00
libgeom libgeom: Avoid fixed remappings of the devstat device 2024-08-19 16:02:59 +00:00
libgpio Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libgssapi Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libiconv_modules Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00
libifconfig bridge: add per-interface vlan access list 2025-07-05 08:04:31 +01:00
libipsec libipsec: decode SADB_X_EXT_IF_HW_OFFL 2024-07-12 06:29:31 +03:00
libipt Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libiscsiutil libiscsiutil: Fix header to work with C++ 2025-04-02 14:40:32 -04:00
libjail jail: Add meta and env parameters 2025-03-31 09:17:03 +00:00
libkiconv Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libkldelf libkldelf: add see_local parameter to elf_lookup_symbol 2024-10-25 16:20:16 +00:00
libkvm libkvm/kvm_open.3: document broken full dumps 2025-06-22 06:49:32 +03:00
libldns Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
liblua Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
liblutok lutok: Switch from std::auto_ptr<> to std::unique_ptr<> 2025-04-16 10:09:18 -04:00
liblzma MFV: xz 5.8.1. 2025-05-04 00:06:22 -07:00
libmagic libmagic: Unbreak for older FreeBSD releases. 2025-01-07 20:42:16 -08:00
libmd lib/libmd: reenable AVX2 SHA1 kernel 2025-06-04 12:28:03 +02:00
libmemstat Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmilter Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmixer mixer(3): Do not skip devices with no volume control 2025-02-25 13:44:49 +02:00
libmp Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libmt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libnetbsd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libnetgraph lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
libnetmap Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libnv libnv: add tests to verify potential overflow issues 2024-09-04 13:43:16 +02:00
libnvmf libnvmf: Add nvmf_nqn_valid_strict() function 2025-07-28 14:33:03 -04:00
libomp Partially revert 6527682ab7 for llvm-based projects 2025-04-24 16:36:40 +02:00
libopenbsd libopenbsd: Add recallocarray() 2025-07-06 23:09:00 +00:00
libopencsd lib: Move libopencsd to /usr/lib and make private 2025-07-30 11:11:38 +01:00
libpam krb5: use 'kerberos' as package name 2025-07-24 11:35:35 +01:00
libpathconv manuals: Fix "missing end of block" errors 2024-10-07 15:40:58 -03:00
libpcap libpcap: Add changes missed in update to 1.10.5 2024-09-14 14:35:58 -03:00
libpe Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libpfctl pf: Use different address family for source and redirection address 2025-08-01 12:11:30 +02:00
libpjdlog lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
libpmc libpmc: add more alderlake models 2025-02-25 11:35:26 -04:00
libpmcstat libpmcstat: fix pmcstat -G on older-ish -CURRENT w/ drm-kmod 2025-04-20 23:00:01 -05:00
libproc Fix proc_signame() to use sig2str() 2025-06-11 17:16:22 -06:00
libprocstat libprocstat: Add handling for inotify descriptors 2025-07-04 14:42:34 +00:00
libradius radlib: fix a memory leak in is_valid_request 2024-06-04 19:40:55 -07:00
libregex Update Makefile.depend files 2024-10-14 10:26:17 -07:00
librpcsec_gss Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00
librpcsvc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
librss manuals: Misc syntax fixes 2024-10-08 16:13:39 -03:00
librt Update Makefile.depend files 2024-10-14 10:26:17 -07:00
librtld_db Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-07-30 12:16:36 -04:00
libsbuf lib/libsbuf/tests: reformat with clang-format 2024-12-01 20:39:52 -08:00
libsdp Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
libsecureboot Add DEBUG_PRINTF to stand.h 2025-07-17 16:36:17 -07:00
libsm Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsmb Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsmdb Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsmutil Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libsqlite3 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libssp Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libssp_nonshared Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00
libstats Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libstdbuf Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libstdthreads Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libsys getsockopt.2: Add SO_SPLICE source socket read and socket close behavior 2025-07-26 14:18:47 -07:00
libsysdecode libsysdecode: Add O_CLOFORK flags to sysdecode 2025-07-06 23:09:18 +00:00
libtacplus lib: Automated cleanup of cdefs and other formatting 2023-11-26 22:23:59 -07:00
libtelnet telnet: Add Support for MIT KRB5 build 2025-06-15 19:49:36 -07:00
libthr libthr: fix typo in comment 2025-07-30 02:33:04 +03:00
libthread_db Remove "All Rights Reserved" from FreeBSD Foundation copyrights 2024-07-30 12:16:36 -04:00
libucl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libufs add packages for libufs, libzfs 2025-05-05 16:39:25 +01:00
libugidfw Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libulog Retire MK_PROFILE infrastructure 2024-11-12 12:11:51 -05:00
libunbound unbound: Update version strings 2025-04-26 20:40:17 -07:00
libusb libusb: implement libusb_fill_bulk_stream_transfer 2025-07-21 02:16:41 -04:00
libusbhid libusbhid: add missing include guards 2024-06-06 10:09:05 -04:00
libutil libutil: Move cpuset(1) domain policy parsing code into libutil 2025-07-27 18:31:48 +02:00
libveriexec manuals: Fix "unusual .Xr" warnings with a script 2024-10-15 17:18:14 -03:00
libvgl lib/libvgl/main.c: remove an extra semicolon 2024-02-02 18:35:01 -07:00
libvmmapi libvmmapi: Add support for setting up and configuring guest NUMA domains 2025-07-27 18:31:48 +02:00
libwrap Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libxo Update Makefile.depend files 2024-10-14 10:26:17 -07:00
liby Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libyaml libyaml: import libyaml vendor version 0.2.5 2025-06-26 09:02:31 +02:00
libypclnt Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
libz Update Makefile.depend files 2024-10-14 10:26:17 -07:00
libzstd Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
msun fix build after _types.h changes 2025-06-12 14:22:17 +01:00
ncurses ncurses: Provide reproducible paths 2025-07-14 14:45:57 +00:00
nss_tacplus nss_tacplus: Provide dummy setpwent(), getpwent_r(), endpwent(). 2023-08-31 07:49:57 +00:00
ofed src: Use gnu++17 as the default C++ standard 2025-04-11 09:53:50 -04:00
tests Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile libyaml: import libyaml vendor version 0.2.5 2025-06-26 09:02:31 +02:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00