]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r223223:
authorbz <bz@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 27 Jun 2011 11:10:15 +0000 (11:10 +0000)
committerbz <bz@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 27 Jun 2011 11:10:15 +0000 (11:10 +0000)
commit38413aff485d800ac905ba71fa5f34460f976b26
tree98bf483e03f75925ac9c3ee3305710674bed7137
parent5d98419442750211094ee109bc4192435e2be120
MFC r223223:

 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

git-svn-id: svn://svn.freebsd.org/base/stable/8@223588 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/net/if_gre.c
sys/net/if_gre.h