aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjix@bugmachine.ca <jix@bugmachine.ca>2005-03-31 06:30:09 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2005-03-31 06:30:09 -0800
commitfaf3034ed66a3400cc90574e9e8022b5f7609bfd (patch)
tree13670fd022ba432939b153b6710b8bd2a8d1b035
parent2b49e85464e3e2e1ce30bf6df6e40b5260cb342c (diff)
downloadhistory-faf3034ed66a3400cc90574e9e8022b5f7609bfd.tar.gz
[NETFILTER]: ipt_hashlimit: Fix bug introduced by hlist changes.
Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/netfilter/ipt_hashlimit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/ipt_hashlimit.c b/net/ipv4/netfilter/ipt_hashlimit.c
index 7b923d40861e1a..a727913fd83d82 100644
--- a/net/ipv4/netfilter/ipt_hashlimit.c
+++ b/net/ipv4/netfilter/ipt_hashlimit.c
@@ -117,18 +117,18 @@ hash_dst(const struct ipt_hashlimit_htable *ht, const struct dsthash_dst *dst)
static inline struct dsthash_ent *
__dsthash_find(const struct ipt_hashlimit_htable *ht, struct dsthash_dst *dst)
{
- struct dsthash_ent *ent = NULL;
+ struct dsthash_ent *ent;
struct hlist_node *pos;
u_int32_t hash = hash_dst(ht, dst);
if (!hlist_empty(&ht->hash[hash]))
hlist_for_each_entry(ent, pos, &ht->hash[hash], node) {
if (dst_cmp(ent, dst)) {
- break;
+ return ent;
}
}
- return ent;
+ return NULL;
}
/* allocate dsthash_ent, initialize dst, put in htable and lock it */