Mon May 11 20:02:44 2009 UTC ()
Pull up following revision(s) (requested by kefren in ticket #748):
	sys/dist/ipf/netinet/ip_fil_netbsd.c: revision 1.50
Don't call callout_stop() without callout_init()
Fixes PR/41364


(bouyer)
diff -r1.46.8.1 -r1.46.8.2 src/sys/dist/ipf/netinet/ip_fil_netbsd.c

cvs diff -r1.46.8.1 -r1.46.8.2 src/sys/dist/ipf/netinet/Attic/ip_fil_netbsd.c (expand / switch to unified diff)

--- src/sys/dist/ipf/netinet/Attic/ip_fil_netbsd.c 2009/02/19 20:33:39 1.46.8.1
+++ src/sys/dist/ipf/netinet/Attic/ip_fil_netbsd.c 2009/05/11 20:02:43 1.46.8.2
@@ -1,24 +1,24 @@ @@ -1,24 +1,24 @@
1/* $NetBSD: ip_fil_netbsd.c,v 1.46.8.1 2009/02/19 20:33:39 snj Exp $ */ 1/* $NetBSD: ip_fil_netbsd.c,v 1.46.8.2 2009/05/11 20:02:43 bouyer Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1993-2003 by Darren Reed. 4 * Copyright (C) 1993-2003 by Darren Reed.
5 * 5 *
6 * See the IPFILTER.LICENCE file for details on licencing. 6 * See the IPFILTER.LICENCE file for details on licencing.
7 */ 7 */
8#if !defined(lint) 8#if !defined(lint)
9#if defined(__NetBSD__) 9#if defined(__NetBSD__)
10#include <sys/cdefs.h> 10#include <sys/cdefs.h>
11__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.46.8.1 2009/02/19 20:33:39 snj Exp $"); 11__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.46.8.2 2009/05/11 20:02:43 bouyer Exp $");
12#else 12#else
13static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed"; 13static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";
14static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 2.55.2.59 2008/03/01 23:16:38 darrenr Exp"; 14static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 2.55.2.59 2008/03/01 23:16:38 darrenr Exp";
15#endif 15#endif
16#endif 16#endif
17 17
18#if defined(KERNEL) || defined(_KERNEL) 18#if defined(KERNEL) || defined(_KERNEL)
19# undef KERNEL 19# undef KERNEL
20# undef _KERNEL 20# undef _KERNEL
21# define KERNEL 1 21# define KERNEL 1
22# define _KERNEL 1 22# define _KERNEL 1
23#endif 23#endif
24#include <sys/param.h> 24#include <sys/param.h>
@@ -461,27 +461,28 @@ int ipfdetach() @@ -461,27 +461,28 @@ int ipfdetach()
461 struct pfil_head *ph_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET); 461 struct pfil_head *ph_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET);
462# ifdef USE_INET6 462# ifdef USE_INET6
463 struct pfil_head *ph_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6); 463 struct pfil_head *ph_inet6 = pfil_head_get(PFIL_TYPE_AF, AF_INET6);
464# endif 464# endif
465# if defined(PFIL_TYPE_IFNET) && defined(PFIL_IFNET) 465# if defined(PFIL_TYPE_IFNET) && defined(PFIL_IFNET)
466 struct pfil_head *ph_ifsync = pfil_head_get(PFIL_TYPE_IFNET, 0); 466 struct pfil_head *ph_ifsync = pfil_head_get(PFIL_TYPE_IFNET, 0);
467# endif 467# endif
468# endif 468# endif
469#endif 469#endif
470 470
471 SPL_NET(s); 471 SPL_NET(s);
472 472
473#if (__NetBSD_Version__ >= 104010000) 473#if (__NetBSD_Version__ >= 104010000)
474 callout_stop(&fr_slowtimer_ch); 474 if (fr_running > 0)
 475 callout_stop(&fr_slowtimer_ch);
475#else 476#else
476 untimeout(fr_slowtimer, NULL); 477 untimeout(fr_slowtimer, NULL);
477#endif /* NetBSD */ 478#endif /* NetBSD */
478 479
479 fr_checkp = fr_savep; 480 fr_checkp = fr_savep;
480 (void) frflush(IPL_LOGIPF, 0, FR_INQUE|FR_OUTQUE|FR_INACTIVE); 481 (void) frflush(IPL_LOGIPF, 0, FR_INQUE|FR_OUTQUE|FR_INACTIVE);
481 (void) frflush(IPL_LOGIPF, 0, FR_INQUE|FR_OUTQUE); 482 (void) frflush(IPL_LOGIPF, 0, FR_INQUE|FR_OUTQUE);
482 483
483#ifdef INET 484#ifdef INET
484 if (fr_control_forwarding & 2) 485 if (fr_control_forwarding & 2)
485 ipforwarding = 0; 486 ipforwarding = 0;
486#endif 487#endif
487 488