Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78518
b: refs/heads/master
c: 03dafbb
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 28, 2008
1 parent 83c940f commit 9875844
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 06e1374a7ed45f1788353a2944a20133adc55649
refs/heads/master: 03dafbbdf8a5e8a9e3e347a393930ed49506d00b
28 changes: 3 additions & 25 deletions trunk/net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,23 +435,6 @@ static int mark_source_chains(struct xt_table_info *newinfo,
return 1;
}

static inline int standard_check(const struct arpt_entry_target *t,
unsigned int max_offset)
{
/* Check standard info. */
if (t->u.target_size
!= ARPT_ALIGN(sizeof(struct arpt_standard_target))) {
duprintf("arpt_standard_check: target size %u != %Zu\n",
t->u.target_size,
ARPT_ALIGN(sizeof(struct arpt_standard_target)));
return 0;
}

return 1;
}

static struct arpt_target arpt_standard_target;

static inline int check_entry(struct arpt_entry *e, const char *name, unsigned int size,
unsigned int *i)
{
Expand Down Expand Up @@ -486,14 +469,9 @@ static inline int check_entry(struct arpt_entry *e, const char *name, unsigned i
if (ret)
goto err;

if (t->u.kernel.target == &arpt_standard_target) {
if (!standard_check(t, size)) {
ret = -EINVAL;
goto err;
}
} else if (t->u.kernel.target->checkentry
&& !t->u.kernel.target->checkentry(name, e, target, t->data,
e->comefrom)) {
if (t->u.kernel.target->checkentry
&& !t->u.kernel.target->checkentry(name, e, target, t->data,
e->comefrom)) {
duprintf("arp_tables: check failed for `%s'.\n",
t->u.kernel.target->name);
ret = -EINVAL;
Expand Down

0 comments on commit 9875844

Please sign in to comment.