| version 1.232, 2006/09/19 21:42:30 |
version 1.233, 2006/10/05 17:35:19 |
| Line 488 ip_input(struct mbuf *m) |
|
| Line 488 ip_input(struct mbuf *m) |
|
| int downmatch; |
int downmatch; |
| int checkif; |
int checkif; |
| int srcrt = 0; |
int srcrt = 0; |
| |
int s; |
| u_int hash; |
u_int hash; |
| #ifdef FAST_IPSEC |
#ifdef FAST_IPSEC |
| struct m_tag *mtag; |
struct m_tag *mtag; |
| struct tdb_ident *tdbi; |
struct tdb_ident *tdbi; |
| struct secpolicy *sp; |
struct secpolicy *sp; |
| int s, error; |
int error; |
| #endif /* FAST_IPSEC */ |
#endif /* FAST_IPSEC */ |
| |
|
| MCLAIM(m, &ip_rx_mowner); |
MCLAIM(m, &ip_rx_mowner); |
|
|
| */ |
*/ |
| if (mff || ip->ip_off != htons(0)) { |
if (mff || ip->ip_off != htons(0)) { |
| ipstat.ips_fragments++; |
ipstat.ips_fragments++; |
| |
s = splvm(); |
| ipqe = pool_get(&ipqent_pool, PR_NOWAIT); |
ipqe = pool_get(&ipqent_pool, PR_NOWAIT); |
| |
splx(s); |
| if (ipqe == NULL) { |
if (ipqe == NULL) { |
| ipstat.ips_rcvmemdrop++; |
ipstat.ips_rcvmemdrop++; |
| IPQ_UNLOCK(); |
IPQ_UNLOCK(); |
| Line 1055 ip_reass(struct ipqent *ipqe, struct ipq |
|
| Line 1058 ip_reass(struct ipqent *ipqe, struct ipq |
|
| struct ip *ip; |
struct ip *ip; |
| struct mbuf *t; |
struct mbuf *t; |
| int hlen = ipqe->ipqe_ip->ip_hl << 2; |
int hlen = ipqe->ipqe_ip->ip_hl << 2; |
| int i, next; |
int i, next, s; |
| |
|
| IPQ_LOCK_CHECK(); |
IPQ_LOCK_CHECK(); |
| |
|
| Line 1160 ip_reass(struct ipqent *ipqe, struct ipq |
|
| Line 1163 ip_reass(struct ipqent *ipqe, struct ipq |
|
| nq = TAILQ_NEXT(q, ipqe_q); |
nq = TAILQ_NEXT(q, ipqe_q); |
| m_freem(q->ipqe_m); |
m_freem(q->ipqe_m); |
| TAILQ_REMOVE(&fp->ipq_fragq, q, ipqe_q); |
TAILQ_REMOVE(&fp->ipq_fragq, q, ipqe_q); |
| |
s = splvm(); |
| pool_put(&ipqent_pool, q); |
pool_put(&ipqent_pool, q); |
| |
splx(s); |
| fp->ipq_nfrags--; |
fp->ipq_nfrags--; |
| ip_nfrags--; |
ip_nfrags--; |
| } |
} |
|
|
| m->m_next = 0; |
m->m_next = 0; |
| m_cat(m, t); |
m_cat(m, t); |
| nq = TAILQ_NEXT(q, ipqe_q); |
nq = TAILQ_NEXT(q, ipqe_q); |
| |
s = splvm(); |
| pool_put(&ipqent_pool, q); |
pool_put(&ipqent_pool, q); |
| |
splx(s); |
| for (q = nq; q != NULL; q = nq) { |
for (q = nq; q != NULL; q = nq) { |
| t = q->ipqe_m; |
t = q->ipqe_m; |
| nq = TAILQ_NEXT(q, ipqe_q); |
nq = TAILQ_NEXT(q, ipqe_q); |
| |
s = splvm(); |
| pool_put(&ipqent_pool, q); |
pool_put(&ipqent_pool, q); |
| |
splx(s); |
| m_cat(m, t); |
m_cat(m, t); |
| } |
} |
| ip_nfrags -= fp->ipq_nfrags; |
ip_nfrags -= fp->ipq_nfrags; |
|
|
| ip_nfrags--; |
ip_nfrags--; |
| ipstat.ips_fragdropped++; |
ipstat.ips_fragdropped++; |
| m_freem(m); |
m_freem(m); |
| |
s = splvm(); |
| pool_put(&ipqent_pool, ipqe); |
pool_put(&ipqent_pool, ipqe); |
| |
splx(s); |
| return (0); |
return (0); |
| } |
} |
| |
|
| Line 1253 ip_freef(struct ipq *fp) |
|
| Line 1264 ip_freef(struct ipq *fp) |
|
| { |
{ |
| struct ipqent *q, *p; |
struct ipqent *q, *p; |
| u_int nfrags = 0; |
u_int nfrags = 0; |
| |
int s; |
| |
|
| IPQ_LOCK_CHECK(); |
IPQ_LOCK_CHECK(); |
| |
|
| Line 1261 ip_freef(struct ipq *fp) |
|
| Line 1273 ip_freef(struct ipq *fp) |
|
| m_freem(q->ipqe_m); |
m_freem(q->ipqe_m); |
| nfrags++; |
nfrags++; |
| TAILQ_REMOVE(&fp->ipq_fragq, q, ipqe_q); |
TAILQ_REMOVE(&fp->ipq_fragq, q, ipqe_q); |
| |
s = splvm(); |
| pool_put(&ipqent_pool, q); |
pool_put(&ipqent_pool, q); |
| |
splx(s); |
| } |
} |
| |
|
| if (nfrags != fp->ipq_nfrags) |
if (nfrags != fp->ipq_nfrags) |