PR/24981: Steven M. Bellovin: ipfilter in 2.0 branch panics the system
patch applied.
This commit is contained in:
parent
a218a37d8f
commit
e982110b53
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip_fil_netbsd.c,v 1.6 2004/05/09 04:02:32 christos Exp $ */
|
||||
/* $NetBSD: ip_fil_netbsd.c,v 1.7 2004/05/09 04:17:34 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1993-2003 by Darren Reed.
|
||||
@ -1456,9 +1456,13 @@ INLINE void fr_checkv4sum(fin)
|
||||
fr_info_t *fin;
|
||||
{
|
||||
#ifdef M_CSUM_TCP_UDP_BAD
|
||||
int manual = 0, pflag, cflags, active;
|
||||
int manual, pflag, cflags, active;
|
||||
mb_t *m;
|
||||
|
||||
if ((fin->fin_flx & FI_NOCKSUM) != 0)
|
||||
return 0;
|
||||
|
||||
manual = 0;
|
||||
m = fin->fin_m;
|
||||
if (m == NULL) {
|
||||
manual = 1;
|
||||
@ -1517,9 +1521,13 @@ INLINE void fr_checkv6sum(fin)
|
||||
fr_info_t *fin;
|
||||
{
|
||||
# ifdef M_CSUM_TCP_UDP_BAD
|
||||
int manual = 0, pflag, cflags, active;
|
||||
int manual, pflag, cflags, active;
|
||||
mb_t *m;
|
||||
|
||||
if ((fin->fin_flx & FI_NOCKSUM) != 0)
|
||||
return 0;
|
||||
|
||||
manual = 0;
|
||||
m = fin->fin_m;
|
||||
|
||||
switch (fin->fin_p)
|
||||
@ -1554,12 +1562,12 @@ fr_info_t *fin;
|
||||
}
|
||||
# ifdef IPFILTER_CKSUM
|
||||
if (manual != 0)
|
||||
if (fr_checkl6sum(fin) == -1)
|
||||
if (fr_checkl4sum(fin) == -1)
|
||||
fin->fin_flx |= FI_BAD;
|
||||
# endif
|
||||
# else
|
||||
# ifdef IPFILTER_CKSUM
|
||||
if (fr_checkl6sum(fin) == -1)
|
||||
if (fr_checkl4sum(fin) == -1)
|
||||
fin->fin_flx |= FI_BAD;
|
||||
# endif
|
||||
# endif
|
||||
|
Loading…
Reference in New Issue
Block a user