aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_sctp.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2006-03-22 16:55:40 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-22 16:55:40 -0500
commita45049c51ce6a3fecf2a909b591b28164c927112 (patch)
tree582c35205f9c1c12825447a009518eb2116beacd /net/netfilter/xt_sctp.c
parent4e3882f77376e036a52b022909d7e910714bd27b (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_sctp.c')
-rw-r--r--net/netfilter/xt_sctp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c
index f5d698ba03c..c6eb24a2fe1 100644
--- a/net/netfilter/xt_sctp.c
+++ b/net/netfilter/xt_sctp.c
@@ -186,6 +186,7 @@ static struct xt_match sctp_match = {
186 .matchsize = sizeof(struct xt_sctp_info), 186 .matchsize = sizeof(struct xt_sctp_info),
187 .proto = IPPROTO_SCTP, 187 .proto = IPPROTO_SCTP,
188 .checkentry = checkentry, 188 .checkentry = checkentry,
189 .family = AF_INET,
189 .me = THIS_MODULE 190 .me = THIS_MODULE
190}; 191};
191 192
@@ -195,27 +196,28 @@ static struct xt_match sctp6_match = {
195 .matchsize = sizeof(struct xt_sctp_info), 196 .matchsize = sizeof(struct xt_sctp_info),
196 .proto = IPPROTO_SCTP, 197 .proto = IPPROTO_SCTP,
197 .checkentry = checkentry, 198 .checkentry = checkentry,
199 .family = AF_INET6,
198 .me = THIS_MODULE 200 .me = THIS_MODULE
199}; 201};
200 202
201static int __init init(void) 203static int __init init(void)
202{ 204{
203 int ret; 205 int ret;
204 ret = xt_register_match(AF_INET, &sctp_match); 206 ret = xt_register_match(&sctp_match);
205 if (ret) 207 if (ret)
206 return ret; 208 return ret;
207 209
208 ret = xt_register_match(AF_INET6, &sctp6_match); 210 ret = xt_register_match(&sctp6_match);
209 if (ret) 211 if (ret)
210 xt_unregister_match(AF_INET, &sctp_match); 212 xt_unregister_match(&sctp_match);
211 213
212 return ret; 214 return ret;
213} 215}
214 216
215static void __exit fini(void) 217static void __exit fini(void)
216{ 218{
217 xt_unregister_match(AF_INET6, &sctp6_match); 219 xt_unregister_match(&sctp6_match);
218 xt_unregister_match(AF_INET, &sctp_match); 220 xt_unregister_match(&sctp_match);
219} 221}
220 222
221module_init(init); 223module_init(init);