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

Commit aded9f3e authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso
Browse files

netfilter: x_tables: remove obsolete check



Since 'netfilter: x_tables: validate targets of jumps' change we
validate that the target aligns exactly with beginning of a rule,
so offset test is now redundant.

Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 95609155
Loading
Loading
Loading
Loading
+0 −8
Original line number Original line Diff line number Diff line
@@ -461,14 +461,6 @@ static int mark_source_chains(const struct xt_table_info *newinfo,
				if (strcmp(t->target.u.user.name,
				if (strcmp(t->target.u.user.name,
					   XT_STANDARD_TARGET) == 0 &&
					   XT_STANDARD_TARGET) == 0 &&
				    newpos >= 0) {
				    newpos >= 0) {
					if (newpos > newinfo->size -
						sizeof(struct arpt_entry)) {
						duprintf("mark_source_chains: "
							"bad verdict (%i)\n",
								newpos);
						return 0;
					}

					/* This a jump; chase it. */
					/* This a jump; chase it. */
					duprintf("Jump rule %u -> %u\n",
					duprintf("Jump rule %u -> %u\n",
						 pos, newpos);
						 pos, newpos);
+0 −7
Original line number Original line Diff line number Diff line
@@ -542,13 +542,6 @@ mark_source_chains(const struct xt_table_info *newinfo,
				if (strcmp(t->target.u.user.name,
				if (strcmp(t->target.u.user.name,
					   XT_STANDARD_TARGET) == 0 &&
					   XT_STANDARD_TARGET) == 0 &&
				    newpos >= 0) {
				    newpos >= 0) {
					if (newpos > newinfo->size -
						sizeof(struct ipt_entry)) {
						duprintf("mark_source_chains: "
							"bad verdict (%i)\n",
								newpos);
						return 0;
					}
					/* This a jump; chase it. */
					/* This a jump; chase it. */
					duprintf("Jump rule %u -> %u\n",
					duprintf("Jump rule %u -> %u\n",
						 pos, newpos);
						 pos, newpos);
+0 −7
Original line number Original line Diff line number Diff line
@@ -554,13 +554,6 @@ mark_source_chains(const struct xt_table_info *newinfo,
				if (strcmp(t->target.u.user.name,
				if (strcmp(t->target.u.user.name,
					   XT_STANDARD_TARGET) == 0 &&
					   XT_STANDARD_TARGET) == 0 &&
				    newpos >= 0) {
				    newpos >= 0) {
					if (newpos > newinfo->size -
						sizeof(struct ip6t_entry)) {
						duprintf("mark_source_chains: "
							"bad verdict (%i)\n",
								newpos);
						return 0;
					}
					/* This a jump; chase it. */
					/* This a jump; chase it. */
					duprintf("Jump rule %u -> %u\n",
					duprintf("Jump rule %u -> %u\n",
						 pos, newpos);
						 pos, newpos);