opnsense-src/sys
Mark Johnston c55f457df6 ip: Defer checks for an unspecified dstaddr until after pfil hooks
To comply with Common Criteria certification requirements, it may be
necessary to ensure that packets to 0.0.0.0/::0 are dropped and logged
by the system firewall.  Currently, such packets are dropped by
ip_input() and ip6_input() before reaching pfil hooks; let's defer the
checks slightly to give firewalls a chance to drop the packets
themselves, as this gives better observability.  Add some regression
tests for this with pf+pflog.

Note that prior to commit 713264f6b8, v4 packets to the unspecified
address were not dropped by the IP stack at all.

Note that ip_forward() and ip6_forward() ensure that such packets are
not forwarded; they are passed back unmodified.

Add a regression test which ensures that such packets are visible to
pflog.

Reviewed by:	glebius
MFC after:	3 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	OPNsense
Differential Revision:	https://reviews.freebsd.org/D48163

(cherry picked from commit 40faf87894)
2025-01-31 19:18:01 +00:00
..
amd64 x86 atomics: Remove unused WANT_FUNCTIONS 2025-01-16 19:07:00 +01:00
arm atomics: Constify loads 2025-01-16 19:06:53 +01:00
arm64 atomics: Constify loads 2025-01-16 19:06:53 +01:00
bsm
cam cam: Add 3e/3 as a fatal code 2025-01-24 15:34:19 -07:00
cddl dtrace: Fix the definition of pc_t 2025-01-30 15:23:04 +00:00
compat atomics: Constify loads: Remove now superfluous uses of DECONST() 2025-01-27 19:19:57 +01:00
conf ng_ubt(4): do not attach Realtek 87XX/88XX adaptors in bootloader mode. 2024-12-22 06:34:09 +03:00
contrib zfs: merge openzfs/zfs@e269af1b3 (zfs-2.2-release) into stable/14 2024-12-12 13:22:56 +01:00
crypto
ddb
dev ath(4): Fix a typo in a source code comment 2025-01-29 06:56:59 +01:00
dts
fs nfscl: Fix a crash when a readdir entry has nul in it 2025-01-23 18:25:10 -08:00
gdb
geom geom: Allow BSD type '!0' partitions 2024-12-21 17:04:07 +00:00
gnu
i386 x86 atomics: Remove unused WANT_FUNCTIONS 2025-01-16 19:07:00 +01:00
isa isa: Use a bus_child_deleted method to free ivars for children 2024-11-30 21:46:06 -05:00
kern kern_sysctl: Fix printing function name in the re-use sysctl leaf warning 2025-01-28 23:22:15 +08:00
kgssapi
libkern
modules dtrace: Build systrace_freebsd32 only if COMPAT_FREEBSD32 is configured 2025-01-30 15:23:04 +00:00
net pf: add 'allow-related' to always allow SCTP multihome extra connections 2025-01-30 12:00:31 +01:00
net80211 net80211: Fix a typo in a source code comment 2025-01-29 06:56:16 +01:00
netgraph ng_ubt_intel: Ignore unexpected HCI events 2024-12-22 06:35:08 +03:00
netinet ip: Defer checks for an unspecified dstaddr until after pfil hooks 2025-01-31 19:18:01 +00:00
netinet6 ip: Defer checks for an unspecified dstaddr until after pfil hooks 2025-01-31 19:18:01 +00:00
netipsec netipsec: Pass the right mbuf up 2025-01-20 00:26:35 +00:00
netlink netlink: restore the ability to delete PINNED routes 2025-01-21 14:37:26 +03:00
netpfil pf: Force logging if pf_create_state() fails 2025-01-30 15:28:15 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed
opencrypto
powerpc atomics: Constify loads 2025-01-16 19:06:53 +01:00
riscv atomics: Constify loads: riscv: Convert missed atomic_load_acq_64() 2025-01-27 19:19:52 +01:00
rpc nfs, rpc: Ensure kernel credentials have at least one group 2024-11-15 11:47:43 +01:00
security audit: Fix short-circuiting in syscallenter() 2025-01-17 13:18:51 +00:00
sys fs: Add new VFCF_xxx flags for va_filerev 2025-01-28 14:38:52 -08:00
teken
tests
tools vnode: Make the vop_vector reference a pointer to const 2024-12-03 01:02:10 +00:00
ufs fs: Add new VFCF_xxx flags for va_filerev 2025-01-28 14:38:52 -08:00
vm vm_pageout: Add a chicken switch for multithreaded PQ_INACTIVE scanning 2025-01-23 13:58:07 +00:00
x86 hwpstate_amd: add amd pstate for zen5 2025-01-30 15:23:23 +00:00
xdr rpc: Fix the definition of xdr_void() 2024-11-05 01:05:26 +00:00
xen
Makefile
README.md

FreeBSD Kernel Source:

This directory contains the source files and build glue that make up the FreeBSD kernel and its modules, including both original and contributed software.

Kernel configuration files are located in the conf/ subdirectory of each architecture. GENERIC is the configuration used in release builds. NOTES contains documentation of all possible entries. LINT is a compile-only configuration used to maximize build coverage and detect regressions.

Documentation:

Source code documentation is maintained in a set of man pages, under section 9. These pages are located in share/man/man9, from the top-level of the src tree. Consult intro(9) for an overview of existing pages.

Some additional high-level documentation of the kernel is maintained in the Architecture Handbook.

Source Roadmap:

Directory Description
amd64 AMD64 (64-bit x86) architecture support
arm 32-bit ARM architecture support
arm64 64-bit ARM (AArch64) architecture support
cam Common Access Method storage subsystem - cam(4) and ctl(4)
cddl CDDL-licensed optional sources such as DTrace
conf kernel build glue
compat Linux compatibility layer, FreeBSD 32-bit compatibility
contrib 3rd-party imported software such as OpenZFS
crypto crypto drivers
ddb interactive kernel debugger - ddb(4)
fs most filesystems, excluding UFS, NFS, and ZFS
dev device drivers and other arch independent code
gdb kernel remote GDB stub - gdb(4)
geom GEOM framework - geom(4)
i386 i386 (32-bit x86) architecture support
kern main part of the kernel
libkern libc-like and other support functions for kernel use
modules kernel module infrastructure
net core networking code
net80211 wireless networking (IEEE 802.11) - net80211(4)
netgraph graph-based networking subsystem - netgraph(4)
netinet IPv4 protocol implementation - inet(4)
netinet6 IPv6 protocol implementation - inet6(4)
netipsec IPsec protocol implementation - ipsec(4)
netpfil packet filters - ipfw(4), pf(4), and ipfilter(4)
opencrypto OpenCrypto framework - crypto(7)
powerpc PowerPC/POWER (32 and 64-bit) architecture support
riscv 64-bit RISC-V architecture support
security security facilities - audit(4) and mac(4)
sys kernel headers
tests kernel unit tests
ufs Unix File System - ffs(7)
vm virtual memory system
x86 code shared by AMD64 and i386 architectures