opnsense-src/sys
Zhenlei Huang f4744b8acb EtherIP: Fix passing the address family from if_bridge(4) to gif(4)
Given IPPROTO_IPV4, IPPROTO_IPV6 and IPPROTO_ETHERIP have different
protocol numbers, then it is perfect valid to tunnel IPv4, IPv6 and
Ethernet traffic over IPv[46] by the same interface. Since gif(4) has
already utilized the inbound csum_data field to carry address family,
also teach if_bridge(4) to do that, rather than checking if a gif(4)
interface is member of a if_bridge(4) interface.

Without this fix, tunnel IPv[46] over IPv[46] will not work when the
gif(4) interface is member of a if_bridge(4) interface, aka the EtherIP
setup, as the address family passed from gif_output() will be overwritten
with the wrong one AF_LINK by gif_transmit(), and end up with incorrectly
encapsulated packets.

PR:		227450
Reviewed by:	kp
Tested by:	meta
Fixes:		8a03087223 gif(4): Assert that gif_output() isn't called for EtherIP
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D51682
2025-08-08 18:17:51 +08:00
..
amd64 amd64/pmap: include opt_kstack_pages.h 2025-08-03 03:40:57 +00:00
arm aw_mmc: changes for Allwinner D1 2025-07-22 12:03:48 -03:00
arm64 arm64: Support TBI in userspace 2025-08-08 09:09:38 +01:00
bsm vfs: Initial revision of inotify 2025-07-04 14:42:33 +00:00
cam cam: Enforce real priorities in xpt_action for queued ccbs. 2025-07-21 22:00:53 -06:00
cddl sdt: Initialize probes in two passes 2025-07-28 20:32:39 +00:00
compat acpi_powerres: D3cold support 2025-08-08 11:42:44 +02:00
conf 15.0: Update main to -PRERELEASE 2025-08-07 17:04:34 -07:00
contrib acpi_powerres: D3cold support 2025-08-08 11:42:44 +02:00
crypto newbus: replace leftover device unit wildcards 2025-06-21 05:57:45 +03:00
ddb machine/stdarg.h -> sys/stdarg.h 2025-06-11 17:39:02 +01:00
dev acpi_powerres: D3cold support 2025-08-08 11:42:44 +02:00
dts dts: fix RT-AC58U to match the updated device tree name/alias changes. 2025-04-07 20:45:40 -07:00
fs vfs: Add support for file cloning to VOP_COPY_FILE_RANGE 2025-08-07 17:52:23 -07:00
gdb thread: Remove kernel stack swapping support, part 4 2024-07-29 01:40:22 +00:00
geom sys/geom: use proper style for sizeof operator 2025-07-26 18:13:20 +03:00
gnu bwn(4): BWN_GPL_PHY: make compile again 2025-06-22 00:19:42 +00:00
i386 i386: Avoid calling kmem_alloc_contig(M_NEVERFREED) 2025-07-15 12:52:14 +00:00
isa newbus: replace leftover device unit wildcards 2025-06-21 05:57:45 +03:00
kern syscalls.master: mark _exit as not returning 2025-08-08 10:30:17 +01:00
kgssapi kgssapi: Fix the kgssapi so that it can use MIT Kerberos 2025-08-07 14:02:32 -07:00
libkern machine/stdarg.h -> sys/stdarg.h 2025-06-11 17:39:02 +01:00
modules zfs: merge openzfs/zfs@8302b6e32 2025-08-07 09:06:31 +02:00
net EtherIP: Fix passing the address family from if_bridge(4) to gif(4) 2025-08-08 18:17:51 +08:00
net80211 net80211: don't dereference a NULL HTINFO IE if it's presented 2025-07-16 08:12:11 -07:00
netgraph Internal scheduling priorities: Always use symbolic ones 2025-06-17 22:08:02 -04:00
netinet tcp: ensure SACK rxmit never ends up left of its hole 2025-08-06 23:47:05 +02:00
netinet6 sctp, tcp, udp: improve deferred computation of checksums 2025-08-01 12:09:47 +02:00
netipsec ipsec offload: ipsec_accel_fill_xh() should indirect through fn pointer 2025-07-17 13:57:35 +03:00
netlink netlink: Fully clear parser state between messages 2025-07-31 12:06:47 +02:00
netpfil pf: fix handling unreassembled fragments 2025-08-06 00:27:16 +02:00
netsmb kern: adopt the cr_gid macro for cr_groups[0] more widely 2025-07-24 09:59:08 -05:00
nfs
nfsclient
nfsserver
nlm nlm: set vnet(9) context in the NLM syscall 2025-02-01 01:00:26 -08:00
ofed ofed: jiffies is unsigned long 2025-04-29 13:53:40 +00:00
opencrypto newbus: replace leftover device unit wildcards 2025-06-21 05:57:45 +03:00
powerpc powerpc: Fix multiple issues with FP/VSX save/restore 2025-07-13 14:00:56 -04:00
riscv jh7110_pcie: Add StarFive JH7110 PCIe controller driver 2025-08-07 20:10:32 -03:00
rpc kgssapi: Fix the kgssapi so that it can use MIT Kerberos 2025-08-07 14:02:32 -07:00
security mac: Remove uses of DEBUG_VFS_LOCKS 2025-08-03 21:52:23 +00:00
sys sysent: regen for _exit(2) normalization 2025-08-08 10:30:16 +01:00
teken Typo: brig(h)tness 2024-09-11 08:35:46 +00:00
tests epoch_test: Assign different priorities using offset 1 2025-06-17 22:09:36 -04:00
tools sysent: add a new NORETURN type flag 2025-08-08 10:30:17 +01:00
ufs ufs: Remove uses of DEBUG_VFS_LOCKS 2025-08-03 21:51:58 +00:00
vm vm_page: Clear VM_ALLOC_NOCREAT in vm_page_grab_pflags() 2025-08-04 14:27:26 +00:00
x86 linux: Add inotify support 2025-07-04 14:42:34 +00:00
xdr xdr: provide x_putmbuf method for xdrmem 2025-02-01 01:00:25 -08:00
xen machine/stdarg.h -> sys/stdarg.h 2025-06-11 17:39:02 +01:00
Makefile sys: Index netlink/ files with the cscope target 2024-07-22 09:50:43 +00:00
README.md man filesystems: fix more xrefs after move to s4 2024-06-27 18:32:05 -06:00

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(4)
vm virtual memory system
x86 code shared by AMD64 and i386 architectures