From: Patrick McHardy Date: Tue, 18 Dec 2007 05:53:18 +0000 (-0800) Subject: [NETFILTER]: ip_tables: remove ipchains compatibility hack X-Git-Tag: firefly_0821_release~23655^2~1032 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6d6a55f42d93eeba7add62c3ad6a5409c6fd24ae;p=firefly-linux-kernel-4.4.55.git [NETFILTER]: ip_tables: remove ipchains compatibility hack ipchains support has been removed years ago. kill last remains. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 98c65ac47d4c..439b2925765d 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -1263,10 +1263,6 @@ do_replace(void __user *user, unsigned int len) if (copy_from_user(&tmp, user, sizeof(tmp)) != 0) return -EFAULT; - /* Hack: Causes ipchains to give correct error msg --RR */ - if (len != sizeof(tmp) + tmp.size) - return -ENOPROTOOPT; - /* overflow check */ if (tmp.num_counters >= INT_MAX / sizeof(struct xt_counters)) return -ENOMEM; @@ -1794,10 +1790,6 @@ compat_do_replace(void __user *user, unsigned int len) if (copy_from_user(&tmp, user, sizeof(tmp)) != 0) return -EFAULT; - /* Hack: Causes ipchains to give correct error msg --RR */ - if (len != sizeof(tmp) + tmp.size) - return -ENOPROTOOPT; - /* overflow check */ if (tmp.size >= INT_MAX / num_possible_cpus()) return -ENOMEM;