1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00

When we run into the syncache entry limits syncache_add() tries

to free the oldest entry in the current bucket row.  The global
entry limit may be smaller than the bucket rows and their limit
combined however.  Thus only try to free a syncache entry if we
found one in this bucket row.

Reported by:	kris
This commit is contained in:
Andre Oppermann 2007-04-17 15:25:14 +00:00
parent 90dea4f9a7
commit 9eab54debf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=168817

View File

@ -960,8 +960,8 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th,
* entry and insert the new one.
*/
tcpstat.tcps_sc_zonefail++;
sc = TAILQ_LAST(&sch->sch_bucket, sch_head);
syncache_drop(sc, sch);
if ((sc = TAILQ_LAST(&sch->sch_bucket, sch_head)) != NULL)
syncache_drop(sc, sch);
sc = uma_zalloc(tcp_syncache.zone, M_NOWAIT | M_ZERO);
if (sc == NULL) {
if (tcp_syncookies) {