Skip to content

Commit

Permalink
[NETFILTER]: ip_tables: remove ipchains compatibility hack
Browse files Browse the repository at this point in the history
ipchains support has been removed years ago. kill last remains.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 28, 2008
1 parent da4d0f6 commit 6d6a55f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 6d6a55f

Please sign in to comment.