From b39cd08347c72483a4521a55301a0fa147a2a2b1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 5 Feb 2000 12:13:22 +0000 Subject: Import of Linux 2.2.13 subset (ipv4 stack and related) --- pfinet/linux-src/net/ipv4/ip_masq_portfw.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'pfinet/linux-src/net/ipv4/ip_masq_portfw.c') diff --git a/pfinet/linux-src/net/ipv4/ip_masq_portfw.c b/pfinet/linux-src/net/ipv4/ip_masq_portfw.c index 6c697a10..c4b1ef4c 100644 --- a/pfinet/linux-src/net/ipv4/ip_masq_portfw.c +++ b/pfinet/linux-src/net/ipv4/ip_masq_portfw.c @@ -2,7 +2,7 @@ * IP_MASQ_PORTFW masquerading module * * - * $Id: ip_masq_portfw.c,v 1.3.2.1 1999/07/02 10:10:02 davem Exp $ + * $Id: ip_masq_portfw.c,v 1.3.2.2 1999/08/13 18:26:29 davem Exp $ * * Author: Steven Clarke * @@ -85,7 +85,8 @@ static __inline__ int ip_portfw_del(__u16 protocol, __u16 lport, __u32 laddr, __ (!laddr || n->laddr == laddr) && (!raddr || n->raddr == raddr) && (!rport || n->rport == rport)) { - list_del(entry); + entry = n->list.prev; + list_del(&n->list); ip_masq_mod_dec_nent(mmod_self); kfree_s(n, sizeof(struct ip_portfw)); MOD_DEC_USE_COUNT; @@ -422,8 +423,6 @@ static struct ip_masq * portfw_in_create(const struct sk_buff *skb, const struct raddr, rport, iph->saddr, portp[0], 0); - ip_masq_listen(ms); - if (!ms || atomic_read(&mmod_self->mmod_nent) <= 1 /* || ip_masq_nlocks(&portfw_lock) != 1 */ ) /* @@ -431,6 +430,8 @@ static struct ip_masq * portfw_in_create(const struct sk_buff *skb, const struct */ goto out; + ip_masq_listen(ms); + /* * Entry created, lock==1. * if pref_cnt == 0, move -- cgit v1.2.3