Skip to content

Commit

Permalink
[NETFILTER]: Convert arp_tables targets to centralized error checking
Browse files Browse the repository at this point in the history
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 Mar 21, 2006
1 parent 1d5cd90 commit aa83c1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,11 +1143,13 @@ void arpt_unregister_table(struct arpt_table *table)
/* The built-in targets: standard (NULL) and error. */
static struct arpt_target arpt_standard_target = {
.name = ARPT_STANDARD_TARGET,
.targetsize = sizeof(int),
};

static struct arpt_target arpt_error_target = {
.name = ARPT_ERROR_TARGET,
.target = arpt_error,
.targetsize = ARPT_FUNCTION_MAXNAMELEN,
};

static struct nf_sockopt_ops arpt_sockopts = {
Expand Down
12 changes: 6 additions & 6 deletions net/ipv4/netfilter/arpt_mangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ checkentry(const char *tablename, const void *e, void *targinfo,
return 1;
}

static struct arpt_target arpt_mangle_reg
= {
.name = "mangle",
.target = target,
.checkentry = checkentry,
.me = THIS_MODULE,
static struct arpt_target arpt_mangle_reg = {
.name = "mangle",
.target = target,
.targetsize = sizeof(struct arpt_mangle),
.checkentry = checkentry,
.me = THIS_MODULE,
};

static int __init init(void)
Expand Down

0 comments on commit aa83c1a

Please sign in to comment.