diff options
author | peter <peter@FreeBSD.org> | 1998-03-21 10:04:55 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-03-21 10:04:55 +0000 |
commit | 58e3555d887b6a5b1f460d8ee84ca4e97c0a8217 (patch) | |
tree | b9974c621ce6d3d5054fe5cc47ebdcbc84178204 /contrib/ipfilter/ip_proxy.c | |
parent | 594e73c3109178aa1c5317785aaa284a0c135ff4 (diff) | |
download | FreeBSD-src-58e3555d887b6a5b1f460d8ee84ca4e97c0a8217.zip FreeBSD-src-58e3555d887b6a5b1f460d8ee84ca4e97c0a8217.tar.gz |
Import ipfilter 3.2.3
Diffstat (limited to 'contrib/ipfilter/ip_proxy.c')
-rw-r--r-- | contrib/ipfilter/ip_proxy.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/contrib/ipfilter/ip_proxy.c b/contrib/ipfilter/ip_proxy.c index cea27f6..cc3b9a0 100644 --- a/contrib/ipfilter/ip_proxy.c +++ b/contrib/ipfilter/ip_proxy.c @@ -6,7 +6,7 @@ * to the original author and the contributors. */ #if !defined(lint) -static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 2.0.2.11.2.2 1997/11/12 10:54:11 darrenr Exp $"; +static const char rcsid[] = "@(#)$Id: ip_proxy.c,v 2.0.2.11.2.6 1997/11/28 00:41:25 darrenr Exp $"; #endif #if defined(__FreeBSD__) && defined(KERNEL) && !defined(_KERNEL) @@ -226,7 +226,7 @@ nat_t *nat; * don't do anything with this packet. */ if (tcp->th_sum != fr_tcpsum(*(mb_t **)fin->fin_mp, - ip, tcp)) { + ip, tcp, ip->ip_len)) { frstats[fin->fin_out].fr_tcpbad++; return -1; } @@ -246,7 +246,8 @@ nat_t *nat; aps, nat); } if (err == 2) { - tcp->th_sum = fr_tcpsum(*(mb_t **)fin->fin_mp, ip, tcp); + tcp->th_sum = fr_tcpsum(*(mb_t **)fin->fin_mp, ip, + tcp, ip->ip_len); err = 0; } return err; @@ -298,3 +299,21 @@ void ap_unload() aps_free(aps); } } + + +void ap_expire() +{ + ap_session_t *aps, **apsp; + int i; + + for (i = 0; i < AP_SESS_SIZE; i++) + for (apsp = &ap_sess_tab[i]; (aps = *apsp); ) { + aps->aps_tout--; + if (!aps->aps_tout) { + ap_sess_tab[i] = aps->aps_next; + aps_free(aps); + *apsp = aps->aps_next; + } else + apsp = &aps->aps_next; + } +} |