opnsense-src/sys/net
loos cffa5d67b2 The stf(4) interface name does not conform with the default naming
convention for interfaces, because only one stf(4) interface can exist
in the system.

This disallow the use of unit numbers different than 0, however, it is
possible to create the clone without specify the unit number (wildcard).

In the wildcard case we must update the interface name before return.

This fix an infinite recursion in pf code that keeps track of network
interfaces and groups:

1 - a group for the cloned type of the interface is added (stf in this
    case);
2 - the system will now try to add an interface named stf (instead of
    stf0) to stf group;
3 - when pfi_kif_attach() tries to search for an already existing 'stf'
    interface, the 'stf' group is returned and thus the group is added
    as an interface of itself;

This will now cause a crash at the first attempt to traverse the groups
which the stf interface belongs (which loops over itself).

Obtained from:	pfSense
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (Netgate)
2017-02-06 05:54:10 +01:00
..
altq src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
bpf.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
bpf.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
bpf_buffer.c src: clean-cut move to release/10.3.0 2016-05-21 08:25:57 +02:00
bpf_buffer.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
bpf_filter.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
bpf_jitter.c src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
bpf_jitter.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
bpf_zerocopy.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
bpf_zerocopy.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
bpfdesc.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
bridgestp.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
bridgestp.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
ethernet.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
fddi.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
firewire.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
flowtable.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
flowtable.h *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00
ieee8023ad_lacp.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
ieee8023ad_lacp.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
ieee_oui.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_arc.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
if_arcsubr.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_arp.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_atm.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_atmsubr.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_bridge.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_bridgevar.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
if_clone.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_clone.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_dead.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_debug.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_disc.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_dl.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_edsc.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_enc.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_enc.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_epair.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_ethersubr.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_fddisubr.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_fwsubr.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_gif.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_gif.h src: clean-cut move to release/10.3.0 2016-05-21 08:25:57 +02:00
if_gre.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_gre.h src: clean-cut move to 10.2-RELEASE 2015-08-14 14:15:00 +02:00
if_iso88025subr.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_lagg.c Fix panic during lagg destruction with simultaneous status check 2017-01-04 09:07:46 +01:00
if_lagg.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_llatbl.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_llatbl.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_llc.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
if_loop.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_me.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_media.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_media.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_mib.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_mib.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
if_pflog.h Revert "tools: apply static_tracker.diff" 2014-12-22 19:18:22 +01:00
if_pfsync.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_sppp.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_spppfr.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_spppsubr.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_stf.c The stf(4) interface name does not conform with the default naming 2017-02-06 05:54:10 +01:00
if_tap.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_tap.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
if_tapvar.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
if_tun.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_tun.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_types.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_var.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_vlan.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_vlan_var.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_vxlan.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
if_vxlan.h src: clean-cut move to 10.2-RELEASE 2015-08-14 14:15:00 +02:00
ifdi_if.m src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
iflib.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
iflib.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
ifq.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
iso88025.h *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00
mp_ring.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
mp_ring.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
mppc.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
mppcc.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
mppcd.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
netisr.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
netisr.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
netisr_internal.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
netmap.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
netmap_user.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
paravirt.h src: clean-cut move to release/10.3.0 2016-05-21 08:25:57 +02:00
pfil.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
pfil.h *: upgrade to 10.1 as a bulk commit 2015-02-10 19:21:02 +01:00
pfkeyv2.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
pfvar.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
ppp_defs.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
radix.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
radix.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
radix_mpath.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
radix_mpath.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
raw_cb.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
raw_cb.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
raw_usrreq.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
route.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
route.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
route_var.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
rss_config.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
rss_config.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
rtsock.c MFC r308580: 2017-01-12 13:58:08 +01:00
sff8436.h src: clean-cut move to release/10.3.0 2016-05-21 08:25:57 +02:00
sff8472.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
slcompress.c src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
slcompress.h src: initial commit based on FreeBSD-10.0 2014-11-09 09:30:14 +01:00
toeplitz.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
toeplitz.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
vnet.c src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00
vnet.h src: clean-cut move to release/11.0.0 2016-10-03 12:28:21 +02:00