Module Name: src Committed By: bouyer Date: Wed May 26 17:38:29 UTC 2010
Modified Files: src/sys/netinet: tcp_input.c Log Message: Make sure SYN_CACHE_TIMER_ARM() has been run before calling syn_cache_put() as it will reschedule the timer. Fixes PR kern/43318. To generate a diff of this commit: cvs rdiff -u -r1.304 -r1.305 src/sys/netinet/tcp_input.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/tcp_input.c diff -u src/sys/netinet/tcp_input.c:1.304 src/sys/netinet/tcp_input.c:1.305 --- src/sys/netinet/tcp_input.c:1.304 Wed Apr 21 20:40:16 2010 +++ src/sys/netinet/tcp_input.c Wed May 26 17:38:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.304 2010/04/21 20:40:16 bouyer Exp $ */ +/* $NetBSD: tcp_input.c,v 1.305 2010/05/26 17:38:29 bouyer Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -145,7 +145,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.304 2010/04/21 20:40:16 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.305 2010/05/26 17:38:29 bouyer Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -4207,6 +4207,11 @@ syn_cache_insert(sc, tp); } else { s = splsoftnet(); + /* + * syn_cache_put() will try to schedule the timer, so + * we need to initialize it + */ + SYN_CACHE_TIMER_ARM(sc); syn_cache_put(sc); splx(s); TCP_STATINC(TCP_STAT_SC_DROPPED);