diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2006-03-22 16:55:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-22 16:55:40 -0500 |
commit | a45049c51ce6a3fecf2a909b591b28164c927112 (patch) | |
tree | 582c35205f9c1c12825447a009518eb2116beacd /net/netfilter/xt_connbytes.c | |
parent | 4e3882f77376e036a52b022909d7e910714bd27b (diff) |
[NETFILTER]: x_tables: set the protocol family in x_tables targets/matches
Set the family field in xt_[matches|targets] registered.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_connbytes.c')
-rw-r--r-- | net/netfilter/xt_connbytes.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/netfilter/xt_connbytes.c b/net/netfilter/xt_connbytes.c index f34ecb9485c..4985f5ec58c 100644 --- a/net/netfilter/xt_connbytes.c +++ b/net/netfilter/xt_connbytes.c | |||
@@ -148,6 +148,7 @@ static struct xt_match connbytes_match = { | |||
148 | .match = match, | 148 | .match = match, |
149 | .checkentry = check, | 149 | .checkentry = check, |
150 | .matchsize = sizeof(struct xt_connbytes_info), | 150 | .matchsize = sizeof(struct xt_connbytes_info), |
151 | .family = AF_INET, | ||
151 | .me = THIS_MODULE | 152 | .me = THIS_MODULE |
152 | }; | 153 | }; |
153 | static struct xt_match connbytes6_match = { | 154 | static struct xt_match connbytes6_match = { |
@@ -155,26 +156,27 @@ static struct xt_match connbytes6_match = { | |||
155 | .match = match, | 156 | .match = match, |
156 | .checkentry = check, | 157 | .checkentry = check, |
157 | .matchsize = sizeof(struct xt_connbytes_info), | 158 | .matchsize = sizeof(struct xt_connbytes_info), |
159 | .family = AF_INET6, | ||
158 | .me = THIS_MODULE | 160 | .me = THIS_MODULE |
159 | }; | 161 | }; |
160 | 162 | ||
161 | static int __init init(void) | 163 | static int __init init(void) |
162 | { | 164 | { |
163 | int ret; | 165 | int ret; |
164 | ret = xt_register_match(AF_INET, &connbytes_match); | 166 | ret = xt_register_match(&connbytes_match); |
165 | if (ret) | 167 | if (ret) |
166 | return ret; | 168 | return ret; |
167 | 169 | ||
168 | ret = xt_register_match(AF_INET6, &connbytes6_match); | 170 | ret = xt_register_match(&connbytes6_match); |
169 | if (ret) | 171 | if (ret) |
170 | xt_unregister_match(AF_INET, &connbytes_match); | 172 | xt_unregister_match(&connbytes_match); |
171 | return ret; | 173 | return ret; |
172 | } | 174 | } |
173 | 175 | ||
174 | static void __exit fini(void) | 176 | static void __exit fini(void) |
175 | { | 177 | { |
176 | xt_unregister_match(AF_INET, &connbytes_match); | 178 | xt_unregister_match(&connbytes_match); |
177 | xt_unregister_match(AF_INET6, &connbytes6_match); | 179 | xt_unregister_match(&connbytes6_match); |
178 | } | 180 | } |
179 | 181 | ||
180 | module_init(init); | 182 | module_init(init); |