aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-03-24 17:50:01 -0400
committerJan Engelhardt <jengelh@medozas.de>2010-03-25 12:05:10 -0400
commitb44672889c11e13e4f4dc0a8ee23f0e64f1e57c6 (patch)
tree6d293cdabf05a747f2599a5781dedfae8978ee8c /net/netfilter
parentd879e19e18ebc69fc20a9b95612e9dd0acf4d7aa (diff)
netfilter: xtables: merge registration structure to NFPROTO_UNSPEC
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/xt_state.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/net/netfilter/xt_state.c b/net/netfilter/xt_state.c
index be00d7b1f53b..bb1271852d50 100644
--- a/net/netfilter/xt_state.c
+++ b/net/netfilter/xt_state.c
@@ -53,35 +53,24 @@ static void state_mt_destroy(const struct xt_mtdtor_param *par)
53 nf_ct_l3proto_module_put(par->family); 53 nf_ct_l3proto_module_put(par->family);
54} 54}
55 55
56static struct xt_match state_mt_reg[] __read_mostly = { 56static struct xt_match state_mt_reg __read_mostly = {
57 { 57 .name = "state",
58 .name = "state", 58 .family = NFPROTO_UNSPEC,
59 .family = NFPROTO_IPV4, 59 .checkentry = state_mt_check,
60 .checkentry = state_mt_check, 60 .match = state_mt,
61 .match = state_mt, 61 .destroy = state_mt_destroy,
62 .destroy = state_mt_destroy, 62 .matchsize = sizeof(struct xt_state_info),
63 .matchsize = sizeof(struct xt_state_info), 63 .me = THIS_MODULE,
64 .me = THIS_MODULE,
65 },
66 {
67 .name = "state",
68 .family = NFPROTO_IPV6,
69 .checkentry = state_mt_check,
70 .match = state_mt,
71 .destroy = state_mt_destroy,
72 .matchsize = sizeof(struct xt_state_info),
73 .me = THIS_MODULE,
74 },
75}; 64};
76 65
77static int __init state_mt_init(void) 66static int __init state_mt_init(void)
78{ 67{
79 return xt_register_matches(state_mt_reg, ARRAY_SIZE(state_mt_reg)); 68 return xt_register_match(&state_mt_reg);
80} 69}
81 70
82static void __exit state_mt_exit(void) 71static void __exit state_mt_exit(void)
83{ 72{
84 xt_unregister_matches(state_mt_reg, ARRAY_SIZE(state_mt_reg)); 73 xt_unregister_match(&state_mt_reg);
85} 74}
86 75
87module_init(state_mt_init); 76module_init(state_mt_init);