diff options
author | Patrick McHardy <kaber@trash.net> | 2006-03-20 21:01:28 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-20 21:01:28 -0500 |
commit | aa83c1ab4384c0905527c84e5135a56daa885834 (patch) | |
tree | 3bfacb7cf888e0d312a1a3ed2e9afff72db5b4f4 /net/ipv4 | |
parent | 1d5cd90976fa0d1cc21554b9d43f5c517323ebfc (diff) |
[NETFILTER]: Convert arp_tables targets to centralized error checking
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/arp_tables.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/arpt_mangle.c | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 2fdf75da7a70..6162d0e328ec 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -1143,11 +1143,13 @@ void arpt_unregister_table(struct arpt_table *table) | |||
1143 | /* The built-in targets: standard (NULL) and error. */ | 1143 | /* The built-in targets: standard (NULL) and error. */ |
1144 | static struct arpt_target arpt_standard_target = { | 1144 | static struct arpt_target arpt_standard_target = { |
1145 | .name = ARPT_STANDARD_TARGET, | 1145 | .name = ARPT_STANDARD_TARGET, |
1146 | .targetsize = sizeof(int), | ||
1146 | }; | 1147 | }; |
1147 | 1148 | ||
1148 | static struct arpt_target arpt_error_target = { | 1149 | static struct arpt_target arpt_error_target = { |
1149 | .name = ARPT_ERROR_TARGET, | 1150 | .name = ARPT_ERROR_TARGET, |
1150 | .target = arpt_error, | 1151 | .target = arpt_error, |
1152 | .targetsize = ARPT_FUNCTION_MAXNAMELEN, | ||
1151 | }; | 1153 | }; |
1152 | 1154 | ||
1153 | static struct nf_sockopt_ops arpt_sockopts = { | 1155 | static struct nf_sockopt_ops arpt_sockopts = { |
diff --git a/net/ipv4/netfilter/arpt_mangle.c b/net/ipv4/netfilter/arpt_mangle.c index c97650a16a5b..4715cf5b06c9 100644 --- a/net/ipv4/netfilter/arpt_mangle.c +++ b/net/ipv4/netfilter/arpt_mangle.c | |||
@@ -80,12 +80,12 @@ checkentry(const char *tablename, const void *e, void *targinfo, | |||
80 | return 1; | 80 | return 1; |
81 | } | 81 | } |
82 | 82 | ||
83 | static struct arpt_target arpt_mangle_reg | 83 | static struct arpt_target arpt_mangle_reg = { |
84 | = { | 84 | .name = "mangle", |
85 | .name = "mangle", | 85 | .target = target, |
86 | .target = target, | 86 | .targetsize = sizeof(struct arpt_mangle), |
87 | .checkentry = checkentry, | 87 | .checkentry = checkentry, |
88 | .me = THIS_MODULE, | 88 | .me = THIS_MODULE, |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static int __init init(void) | 91 | static int __init init(void) |