opnsense-src/sys/net
Pouria Mousavizadeh Tehrani 15052b29a6 route/fib_algo: Fix nexthop index collision across families
fib_algo indexes its idx->nhop array by the nexthop index with
assumption of its uniqueness. Which is true except for IPv4 over
IPv6 nexthops.
Give each index space its own segment within the same array and
offset the index by the segment base. Segments are created on demand
and sized independently, so the rib's own family keeps base 0 and
tables without cross-family nexthops index exactly as before.

Reviewed by:	melifaro
Discussed with:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D59552

(cherry picked from commit 63343822430453f4add20bcbfa134c99132361df)
2026-10-05 15:34:56 +02:00
..
altq altq(4): Fix a typo in a source code comment 2026-01-10 14:09:00 +01:00
route route/fib_algo: Fix nexthop index collision across families 2026-10-05 15:34:56 +02:00
bpf.c bpf: fix handling the read timeout on ppc64 2026-04-26 10:08:05 +02:00
bpf.h bpf: Make bpf.h self-contained 2025-05-03 20:44:45 +00:00
bpf_buffer.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
bpf_buffer.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bpf_filter.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
bpf_jitter.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bpf_jitter.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bpf_zerocopy.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bpf_zerocopy.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bpfdesc.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
bridgestp.c bridge: store a bridge_iflist pointer in ifnet 2025-04-09 09:39:01 +02:00
bridgestp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
debugnet.c debugnet: Use precise types when accessing mbuf contents 2024-10-11 13:23:25 +00:00
debugnet.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
debugnet_inet.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
debugnet_int.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dlt.h libpcap: Update to 1.10.6 2026-04-06 16:41:40 -03:00
dummymbuf.c dummymbuf: add 'enlarge' 2025-01-17 17:00:08 +01:00
ethernet.h ethernet: Move the assertion of ether header sizes back into ethernet.h 2025-07-15 23:31:19 +08:00
firewire.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee8023ad_lacp.c net/if_media.h: Add 800GBase-X and 200Gbit/s per lane support 2026-07-06 11:04:59 +02:00
ieee8023ad_lacp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee_oui.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if.c net/if.c: Add fib-aware ifa_ifwithaddr() 2026-09-14 08:59:48 +02:00
if.h ifnet: Add handling for toggling IFF_ALLMULTI in ifhwioctl() 2024-09-06 16:58:44 +00:00
if_arp.h Support ARP for 802 networks 2024-04-23 12:30:53 -04:00
if_bridge.c bridge(4): Remove epoch_enter during destruction 2026-04-14 14:26:15 +03:30
if_bridgevar.h bridge: Restore ABI compatibility with 14.x 2025-08-23 00:43:48 +01:00
if_clone.c if_clone: Make ifnet_detach_sxlock opaque to consumers 2026-04-30 17:52:01 +08:00
if_clone.h tun(4)/tap(4): allow devices to be configured as transient 2025-08-21 09:22:44 -05:00
if_dead.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
if_disc.c net: Remove unneeded NULL check for the allocated ifnet 2024-06-28 18:16:29 +08:00
if_dl.h link_addr: be more strict about address formats 2025-05-15 01:02:52 +01:00
if_edsc.c net: Remove unneeded NULL check for the allocated ifnet 2024-06-28 18:16:29 +08:00
if_enc.c if_enc(4): Use new KPI to create enc interface 2024-10-12 21:37:53 +08:00
if_enc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_epair.c epair: add VLAN_HWTAGGING 2026-04-26 09:45:05 +02:00
if_ethersubr.c rss: add sysctl enable toggle 2026-06-25 11:18:46 +02:00
if_fwsubr.c if_firewire: Make firewire_broadcastaddr static const 2025-06-01 22:47:24 +08:00
if_gif.c EtherIP: Fix passing the address family from if_bridge(4) to gif(4) 2025-08-08 18:17:51 +08:00
if_gif.h if_gif(4): Support the NOCLAMP flag to change MTU handling for IPv6 2025-07-21 22:47:28 +09:00
if_gre.c rss: add sysctl enable toggle 2026-06-25 11:18:46 +02:00
if_gre.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_infiniband.c if_infininband: Support BPF write for broadcast frames 2025-02-23 16:13:09 -08:00
if_ipsec.c sys/netipsec: ensure sah stability during input callback processing 2025-12-29 02:57:03 +02:00
if_ipsec.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_lagg.c lagg: Handle a port count of zero 2026-07-06 11:00:25 +02:00
if_lagg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_llatbl.c if_llatbl: Fix a typo in a KASSERT message 2024-01-20 21:00:22 +01:00
if_llatbl.h sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_llc.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_loop.c loopback: use new names for checksum offloading flags 2026-09-23 08:57:45 +02:00
if_me.c bpf: Make BPF interop consistent with if_loop 2024-04-19 14:48:37 -04:00
if_media.c sys: don't panic on ifm_status being NULL 2025-05-06 21:22:18 -07:00
if_media.h net: Add ifmedia support for 10GBase-BX BiDi 2026-09-11 11:08:32 +02:00
if_mib.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_mib.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_ovpn.c if_ovpn: Fix memory leak in VNET during unload 2026-08-11 08:24:41 +02:00
if_ovpn.h if_ovpn: support floating clients 2025-07-28 16:36:54 +02:00
if_pflog.h pf: make log(matches) more useful 2025-02-21 09:11:03 +01:00
if_pfsync.h pf: Add pfsync protocol for FreeBSD 15 2025-10-01 17:59:44 +02:00
if_private.h net: Fix handling of unmapped user pages in if_getgroup() 2026-07-06 10:58:37 +02:00
if_stf.c if_stf: Free entire mbuf chain on failure 2026-07-06 10:57:48 +02:00
if_stf.h
if_strings.h <net/if_strings.h>: Conditionally export table of bit names 2025-04-28 13:05:38 -04:00
if_tap.h tun(4)/tap(4): allow devices to be configured as transient 2025-08-21 09:22:44 -05:00
if_tun.h tun(4)/tap(4): allow devices to be configured as transient 2025-08-21 09:22:44 -05:00
if_tuntap.c if_tuntap: defer transient destroy_dev() to a taskqueue 2025-12-17 21:51:56 -06:00
if_types.h if_types: Fix a typo in a source code comment 2026-03-30 13:26:19 +02:00
if_var.h net/if.c: Add fib-aware ifa_ifwithaddr() 2026-09-14 08:59:48 +02:00
if_vlan.c if_vlan: Use the exclusive lock everywhere 2026-09-23 08:59:06 +02:00
if_vlan_var.h sys/net: move DOT1Q_VID_* constants to ethernet.h 2025-07-05 00:21:51 +01:00
if_vxlan.c if_vxlan(4): Fix panic by validating unused drvspec values 2026-09-13 13:56:57 +02:00
if_vxlan.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ifdi_if.m iflib: Allow conditional LED device support 2026-09-11 10:55:14 +02:00
iflib.c iflib: remove unused variables 2026-09-23 08:59:51 +02:00
iflib.h iflib: Add restart transactions for IOV reconfiguration 2026-09-11 10:57:07 +02:00
ifq.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ifq.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
infiniband.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mp_ring.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
mp_ring.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mppc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mppcc.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mppcd.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netisr.c netisr: fix compilation without VIMAGE 2025-01-16 20:32:53 -08:00
netisr.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netisr_internal.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
netmap.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_legacy.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_user.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
netmap_virt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
paravirt.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
pfil.c pfil: PFIL_PASS never frees the mbuf 2024-01-29 14:10:19 +01:00
pfil.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
pfkeyv2.h sys/pfkeyv2.h: define extensions for ipsec inline accel control 2024-07-12 06:29:31 +03:00
pflow.h pflow: show socket status in verbose mode 2024-01-25 17:37:51 +01:00
pfvar.h pf: switch to getmicro(up)time() 2026-08-11 08:29:00 +02:00
ppp_defs.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
radix.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
radix.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
rndis.h net: Fix typo (triple S) 2023-12-27 20:24:32 -07:00
route.c Revert "sys/socket.h: Fix AF_MAX" 2026-08-12 19:25:57 +02:00
route.h net/route: Add an eventhandler for rt_numfibs changes 2026-08-25 10:31:46 +02:00
rss_config.c rss: add sysctl enable toggle 2026-06-25 11:18:46 +02:00
rss_config.h rss: add sysctl enable toggle 2026-06-25 11:18:46 +02:00
rtsock.c Revert "sys/socket.h: Fix AF_MAX" 2026-08-12 19:25:57 +02:00
sff8436.h sys/net/sff8436.h: Fix the register address of link length of copper or active cable 2026-02-01 01:01:11 +08:00
sff8472.h net/sff8472.h: add double-include protection 2025-04-29 06:20:10 +03:00
slcompress.c tcp: extend the use of the th_flags accessor function 2024-11-29 09:48:23 +01:00
slcompress.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
toeplitz.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
toeplitz.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vnet.c vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned 2026-03-05 18:51:20 +08:00
vnet.h vnet: remove unneeded backslash 2024-03-15 12:17:04 -07:00