freebsd-dev/sys/net
Bjoern A. Zeeb 52dcd04ba3 gre(4) was using a field in the softc to detect possible recursion.
On MP systems this is not a usable solution anymore and could easily
lead to false positives triggering enough logging that even  using
the console was no longer usable (multiple parallel ping -f can do).

Switch to the suggested solution of using mbuf tags to carry per
packet state between gre_output() invocations.  Contrary to the
proposed solution modelled after gif(4) only allocate one mbuf tag
per packet rather than per packet and per gre_output() pass through.

As the sysctl to control the possible valid (gre in gre) nestings does
no sanity checks, make sure to always allocate space in the mbuf tag
for at least one, and at most 255 possible gre interfaces to detect
loops in addition to the counter.

Submitted by:	Cristian KLEIN (cristi net.utcluj.ro) (original version)
PR:		kern/114714
Reviewed by:	Cristian KLEIN (cristi net.utcluj.ro)
Reviewed bu:	Wooseog Choi (ben_choi hotmail.com)
Sponsored by:	Sandvine Incorporated
MFC after:	1 week
2011-06-18 09:34:03 +00:00
..
bpf_buffer.c o Swap descriptions for net.bpf.bufsize and net.bpf.maxbufsize. 2010-11-24 05:50:19 +00:00
bpf_buffer.h
bpf_filter.c
bpf_jitter.c General style cleanup, no functional change. 2009-11-20 21:12:40 +00:00
bpf_jitter.h - Allocate scratch memory on stack instead of pre-allocating it with 2009-11-20 18:49:20 +00:00
bpf_zerocopy.c Introduce and use a new VM interface for temporarily pinning pages. This 2010-12-25 21:26:56 +00:00
bpf_zerocopy.h
bpf.c Fix a typo in a comment. 2010-09-16 18:37:33 +00:00
bpf.h Sync DLTs with the latest pcap version. 2010-10-29 18:41:09 +00:00
bpfdesc.h Implement flexible BPF timestamping framework. 2010-06-15 19:28:44 +00:00
bridgestp.c Set curvnet context in a callout-trigerred code path. 2011-06-07 20:46:03 +00:00
bridgestp.h Set curvnet context in a callout-trigerred code path. 2011-06-07 20:46:03 +00:00
ethernet.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
fddi.h Switch cmd argument to u_long. This matches what if_ethersubr.c does and 2009-06-21 10:29:31 +00:00
firewire.h Switch cmd argument to u_long. This matches what if_ethersubr.c does and 2009-06-21 10:29:31 +00:00
flowtable.c - Restore dropping the priority of syncer down to PPAUSE when it is idle. 2011-01-06 22:17:07 +00:00
flowtable.h allocate ipv6 flows from the ipv6 flow zone 2010-05-16 21:48:39 +00:00
ieee8023ad_lacp.c Use the flowid if its available for selecting the tx port. 2009-04-30 14:25:44 +00:00
ieee8023ad_lacp.h
if_arc.h Switch cmd argument to u_long. This matches what if_ethersubr.c does and 2009-06-21 10:29:31 +00:00
if_arcsubr.c Switch cmd argument to u_long. This matches what if_ethersubr.c does and 2009-06-21 10:29:31 +00:00
if_arp.h - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
if_atm.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_atmsubr.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
if_bridge.c Unbreak LINT by moving all carp hooks to net/if.c / netinet/ip_carp.h, with 2010-08-11 20:18:19 +00:00
if_bridgevar.h
if_clone.c After some off-list discussion, revert a number of changes to the 2010-11-22 19:32:54 +00:00
if_clone.h Introduce and use a sysinit-based initialization scheme for virtual 2009-07-23 20:46:49 +00:00
if_dead.c Remove if_timer/if_watchdog now that they are no longer used. The space 2009-11-30 21:25:57 +00:00
if_debug.c Factor out DDB commands from r204145, r204279 into if_debug.c for further 2010-10-25 08:30:19 +00:00
if_disc.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_dl.h
if_edsc.c
if_ef.c Add new tunable 'net.link.ifqmaxlen' to set default send interface 2010-05-03 07:32:50 +00:00
if_enc.c Make various (pseudo) interfaces compile without INET in the kernel 2011-04-27 19:30:44 +00:00
if_enc.h
if_epair.c Allow for vlan(4) interfaces with MTU of 1500 bytes to be configured 2011-05-24 08:02:55 +00:00
if_ethersubr.c Add an optional netisr dispatch point at ether_input(), but set the 2011-06-01 20:00:25 +00:00
if_faith.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
if_fddisubr.c Break at_ifawithnet() into two variants: 2009-06-24 10:32:44 +00:00
if_fwsubr.c Switch cmd argument to u_long. This matches what if_ethersubr.c does and 2009-06-21 10:29:31 +00:00
if_gif.c Hide the outer IP addresses of a tunnel interfaces (gif(4), gre(4)) 2011-03-02 21:39:08 +00:00
if_gif.h MFP4: @176978-176982, 176984, 176990-176994, 177441 2010-04-29 11:52:42 +00:00
if_gre.c gre(4) was using a field in the softc to detect possible recursion. 2011-06-18 09:34:03 +00:00
if_gre.h gre(4) was using a field in the softc to detect possible recursion. 2011-06-18 09:34:03 +00:00
if_iso88025subr.c Switch cmd argument to u_long. This matches what if_ethersubr.c does and 2009-06-21 10:29:31 +00:00
if_lagg.c LACP frames must not be send VLAN-tagged, check for that before processing. 2011-04-30 20:34:52 +00:00
if_lagg.h Propagate the vlan eventis to the underlying interfaces/members so they can do initialization of hw related features. 2010-02-06 13:49:35 +00:00
if_llatbl.c The statically configured (permanent) ARP entries are removed when an 2011-05-20 19:12:20 +00:00
if_llatbl.h The statically configured (permanent) ARP entries are removed when an 2011-05-20 19:12:20 +00:00
if_llc.h
if_loop.c After some off-list discussion, revert a number of changes to the 2010-11-22 19:32:54 +00:00
if_media.c Fix typos - remove duplicate "the". 2011-02-21 09:01:34 +00:00
if_media.h - Add 10baseT as an alias for 10baseT/UTP. 2011-05-15 12:58:29 +00:00
if_mib.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
if_mib.h
if_sppp.h
if_spppfr.c
if_spppsubr.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
if_stf.c Add new tunable 'net.link.ifqmaxlen' to set default send interface 2010-05-03 07:32:50 +00:00
if_stf.h
if_tap.c - Expand scope of tun/tap softc locks to cover more softc fields and 2010-09-22 21:02:43 +00:00
if_tap.h
if_tapvar.h
if_tun.c Properly return an ENOBUFS error if a write to a tun(4) device fails 2011-06-03 13:47:05 +00:00
if_tun.h
if_types.h - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
if_var.h - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
if_vlan_var.h - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
if_vlan.c - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
if.c When removing ifnets, we should first remove the reference to ifnet 2011-04-04 07:45:08 +00:00
if.h Grab one of the ifcap bits for netmap, and enable printing in ifconfig. 2011-06-14 12:40:55 +00:00
iso88025.h Switch cmd argument to u_long. This matches what if_ethersubr.c does and 2009-06-21 10:29:31 +00:00
netisr_internal.h Rework netisr policy mechanism so that per-protocol dispatch policies can 2011-05-24 12:34:19 +00:00
netisr.c On multi-core, multi-threaded PPC systems, it is important that the threads 2011-05-31 15:11:43 +00:00
netisr.h Rework netisr policy mechanism so that per-protocol dispatch policies can 2011-05-24 12:34:19 +00:00
pfil.c Clean up comments, white space, and style in pfil.c (especially new VNET 2009-10-19 15:19:14 +00:00
pfil.h small portability fix to build on linux/windows 2010-07-15 14:41:06 +00:00
pfkeyv2.h Added support for NAT-Traversal (RFC 3948) in IPsec stack. 2009-06-12 15:44:35 +00:00
ppp_defs.h
radix_mpath.c One of the advantages of enabling ECMP (a.k.a RADIX_MPATH) is to 2010-03-09 01:11:45 +00:00
radix_mpath.h
radix.c whitespace cleanup 2010-07-15 14:41:59 +00:00
radix.h Not only flush the ipfw tables when unloading ipfw or tearing 2010-03-07 15:37:58 +00:00
raw_cb.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
raw_cb.h Remove unused VNET_SET() and related macros; only VNET_GET() is 2009-07-16 21:13:04 +00:00
raw_usrreq.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
route.c ouch, newrt is used on the return path, my fault. 2011-03-19 21:10:57 +00:00
route.h Remove dead code. 2011-03-20 08:35:00 +00:00
rtsock.c As info.rti_info[RTAX_DST] can point inside of rtm we must not free the rtm 2011-02-10 01:24:09 +00:00
slcompress.c
slcompress.h
vnet.c Remove unneeded includes of <sys/linker_set.h>. Other headers that use 2011-01-11 13:59:06 +00:00
vnet.h Mfp4 CH=177255: 2011-02-11 14:17:58 +00:00
zlib.c
zlib.h Merge projects/enhanced_coredumps (r204346) into HEAD: 2010-03-02 06:58:58 +00:00
zutil.h Merge projects/enhanced_coredumps (r204346) into HEAD: 2010-03-02 06:58:58 +00:00