summaryrefslogtreecommitdiffstats
path: root/sys/net/if_gre.h
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2011-06-18 09:34:03 +0000
committerbz <bz@FreeBSD.org>2011-06-18 09:34:03 +0000
commitf4689a8d0f4df134f7909472b0473086af7f65ab (patch)
tree3b0955856b87bf143c51f4b4483870a29c1a9226 /sys/net/if_gre.h
parentaa935a4b7dab53762a43775a83794a9c3e41b201 (diff)
downloadFreeBSD-src-f4689a8d0f4df134f7909472b0473086af7f65ab.zip
FreeBSD-src-f4689a8d0f4df134f7909472b0473086af7f65ab.tar.gz
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
Diffstat (limited to 'sys/net/if_gre.h')
-rw-r--r--sys/net/if_gre.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/net/if_gre.h b/sys/net/if_gre.h
index e23daef..74d16b1 100644
--- a/sys/net/if_gre.h
+++ b/sys/net/if_gre.h
@@ -61,8 +61,6 @@ struct gre_softc {
const struct encaptab *encap; /* encapsulation cookie */
- int called; /* infinite recursion preventer */
-
uint32_t key; /* key included in outgoing GRE packets */
/* zero means none */
OpenPOWER on IntegriCloud