Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cca77b7c authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller
Browse files

netfilter: fix CONFIG_COMPAT support

commit f3c5c1bf
(netfilter: xtables: make ip_tables reentrant) forgot to
also compute the jumpstack size in the compat handlers.

Result is that "iptables -I INPUT -j userchain" turns into -j DROP.

Reported by Sebastian Roesner on #netfilter, closes
http://bugzilla.netfilter.org/show_bug.cgi?id=669

.

Note: arptables change is compile-tested only.

Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Tested-by: default avatarMikael Pettersson <mikpe@it.uu.se>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6a6d01d3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1420,6 +1420,9 @@ static int translate_compat_table(const char *name,
		if (ret != 0)
			break;
		++i;
		if (strcmp(arpt_get_target(iter1)->u.user.name,
		    XT_ERROR_TARGET) == 0)
			++newinfo->stacksize;
	}
	if (ret) {
		/*
+3 −0
Original line number Diff line number Diff line
@@ -1751,6 +1751,9 @@ translate_compat_table(struct net *net,
		if (ret != 0)
			break;
		++i;
		if (strcmp(ipt_get_target(iter1)->u.user.name,
		    XT_ERROR_TARGET) == 0)
			++newinfo->stacksize;
	}
	if (ret) {
		/*
+3 −0
Original line number Diff line number Diff line
@@ -1766,6 +1766,9 @@ translate_compat_table(struct net *net,
		if (ret != 0)
			break;
		++i;
		if (strcmp(ip6t_get_target(iter1)->u.user.name,
		    XT_ERROR_TARGET) == 0)
			++newinfo->stacksize;
	}
	if (ret) {
		/*