From 14a32d80b42b626b6079702f854c8567c61249d5 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sun, 26 Oct 2003 08:01:25 -0800 Subject: [PATCH] [NETFILTER]: Fix ipchains oops in NAT We updated ip_nat_setup_info to set the initialized flag and call place_in_hashes, but *didn't* change the call in ip_fw_compat_masq.c which also calls place_in_hashes() itself (again!). Result: corrupt list, and next thing which lands in the same hash bucket goes boom. Thanks to Andy Polyakov for chasing this down. --- net/ipv4/netfilter/ip_fw_compat_masq.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/ipv4/netfilter/ip_fw_compat_masq.c b/net/ipv4/netfilter/ip_fw_compat_masq.c index 0dcc340e4b36b..7747f9971e00f 100644 --- a/net/ipv4/netfilter/ip_fw_compat_masq.c +++ b/net/ipv4/netfilter/ip_fw_compat_masq.c @@ -91,9 +91,6 @@ do_masquerade(struct sk_buff **pskb, const struct net_device *dev) WRITE_UNLOCK(&ip_nat_lock); return ret; } - - place_in_hashes(ct, info); - info->initialized = 1; } else DEBUGP("Masquerading already done on this conn.\n"); WRITE_UNLOCK(&ip_nat_lock); -- 2.53.0