opnsense-src/sys/net
Zhenlei Huang 02b0415ead if_clone: Allow maxunit to be zero
Some drivers, e.g. if_enc(4), only allow one instance to be created, but
the KPI ifc_attach_cloner() treat zero value of maxunit as not limited,
aka IF_MAXUNIT.

Introduce a new flag IFC_F_LIMITUNIT to indicate that the requested
maxunit is limited and should be respected.

Consumers should use the new flag if there is an intended limit.

Reviewed by:	glebius
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D45757

(cherry picked from commit a2cac544a668d2834ed41986aca32b44b9819c89)
2024-08-09 08:31:52 +02:00
..
altq sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
route fibs: Limit the WARNING message to only once when setting up with multiple fibs 2024-08-09 08:30:41 +02:00
bpf.c bpf: Make dead_bpf_if const 2023-11-13 11:56:57 +08:00
bpf.h bpf: Make bpf_peers_present a boolean inline function 2024-06-17 11:00:24 +02:00
bpf_buffer.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bpf_buffer.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bpf_filter.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06: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 $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
bridgestp.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bridgestp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
debugnet.c debugnet: Fix logging of frame length 2024-04-15 12:00:50 +08: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 sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ethernet.h Teach if_smsc to get MAC from bootargs. 2023-12-28 15:40:31 +01:00
firewire.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee8023ad_lacp.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06: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 ifnet: Remove dead code 2024-07-10 08:06:13 +02:00
if.h net: Fix two typos in source code comments 2024-01-23 07:41:03 +01:00
if_arp.h Support ARP for 802 networks 2024-04-27 10:45:22 -04:00
if_bridge.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
if_bridgevar.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_clone.c if_clone: Allow maxunit to be zero 2024-08-09 08:31:52 +02:00
if_clone.h if_clone: Allow maxunit to be zero 2024-08-09 08:31:52 +02:00
if_dead.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_disc.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
if_dl.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_edsc.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
if_enc.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
if_enc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_epair.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
if_ethersubr.c pfil: PFIL_PASS never frees the mbuf 2024-07-18 13:13:55 +02:00
if_fwsubr.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_gif.c bpf: Make BPF interop consistent with if_loop 2024-06-03 11:06:56 +02:00
if_gif.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
if_gre.c bpf: Make BPF interop consistent with if_loop 2024-06-03 11:06:56 +02:00
if_gre.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_infiniband.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_ipsec.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_ipsec.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_lagg.c lagg: Fix a teardown race 2024-07-15 09:14:42 +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-25 07:47:31 +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 $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_loop.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
if_me.c bpf: Make BPF interop consistent with if_loop 2024-06-03 11:06:56 +02:00
if_media.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
if_media.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06: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 Revert "ovpn: "openvpn" group name concept is misplaced" 2024-07-22 11:15:36 +02:00
if_ovpn.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
if_pflog.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_pfsync.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_private.h IfAPI: Hide the macros that touch ifnet members 2023-04-24 09:54:23 -04:00
if_stf.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
if_stf.h if_stf: make if_stf.h self-contained 2021-12-17 12:38:34 +01:00
if_strings.h ifnet: fix if_strings.h build check 2023-06-16 15:54:29 +00:00
if_tap.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_tun.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_tuntap.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
if_types.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_var.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
if_vlan.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
if_vlan_var.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
if_vxlan.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
if_vxlan.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ifdi_if.m iflib: invert default restart on VLAN changes 2023-08-24 13:48:19 -07:00
iflib.c net: Remove unneeded NULL check for the allocated ifnet 2024-07-15 09:14:32 +02:00
iflib.h iflib: Add subinterface interrupt allocation function 2024-04-24 15:14:48 -07:00
ifq.c IfAPI: Explicitly include <net/if_private.h> in netstack 2023-01-31 15:02:16 -05:00
ifq.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
infiniband.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mp_ring.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06: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 sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06: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-07-18 13:13:55 +02:00
pfil.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
pfkeyv2.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
pfvar.h pf: vnet-ify pf_hashsize, pf_hashmask, pf_srchashsize and V_pf_srchashmask 2024-08-09 08:30:30 +02:00
ppp_defs.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
radix.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
radix.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
rndis.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
route.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
route.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
rss_config.c rss: add sysctl enable toggle 2024-06-03 11:06:55 +02:00
rss_config.h rss: add sysctl enable toggle 2024-06-03 11:06:55 +02:00
rtsock.c route: Wrap long lines 2024-07-29 08:14:05 +02:00
sff8436.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
sff8472.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
slcompress.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
slcompress.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
toeplitz.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
toeplitz.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
vnet.c vnet: (read) lock the vnet list while iterating it 2023-12-14 12:20:25 +01:00
vnet.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00