- ret = xt_register_match(AF_INET6, &state6_match);
- if (ret < 0)
- xt_unregister_match(AF_INET,&state_match);
+static struct xt_match state_mt_reg[] __read_mostly = {
+ {
+ .name = "state",
+ .family = AF_INET,
+ .checkentry = state_mt_check,
+ .match = state_mt,
+ .destroy = state_mt_destroy,
+ .matchsize = sizeof(struct xt_state_info),
+ .me = THIS_MODULE,
+ },
+ {
+ .name = "state",
+ .family = AF_INET6,
+ .checkentry = state_mt_check,
+ .match = state_mt,
+ .destroy = state_mt_destroy,
+ .matchsize = sizeof(struct xt_state_info),
+ .me = THIS_MODULE,
+ },
+};