]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[NETFILTER]: ipt_CLUSTERIP: fix oops in checkentry function
authorJaroslav Kysela <perex@suse.cz>
Fri, 4 May 2007 21:59:07 +0000 (23:59 +0200)
committerAdrian Bunk <bunk@stusta.de>
Fri, 4 May 2007 21:59:07 +0000 (23:59 +0200)
The clusterip_config_find_get() already increases entries reference
counter, so there is no reason to do it twice in checkentry() callback.

This causes the config to be freed before it is removed from the list,
resulting in a crash when adding the next rule.

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
net/ipv4/netfilter/ipt_CLUSTERIP.c

index d9bc971f03afd677907bf9651e2551f227f34e18..307f9cf319385f81fe07d91e3425b6f1a601c9c4 100644 (file)
@@ -423,12 +423,10 @@ checkentry(const char *tablename,
                                       "has invalid config pointer!\n");
                                return 0;
                        }
-                       clusterip_config_entry_get(cipinfo->config);
                } else {
                        /* Case B: This is a new rule referring to an existing
                         * clusterip config. */
                        cipinfo->config = config;
-                       clusterip_config_entry_get(cipinfo->config);
                }
        } else {
                /* Case C: This is a completely new clusterip config */