diff options
Diffstat (limited to 'net/netfilter/xt_LED.c')
| -rw-r--r-- | net/netfilter/xt_LED.c | 39 | 
1 files changed, 27 insertions, 12 deletions
diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c index 36c9720ad8d6..f7b0286d106a 100644 --- a/net/netfilter/xt_LED.c +++ b/net/netfilter/xt_LED.c @@ -175,26 +175,41 @@ static void led_tg_destroy(const struct xt_tgdtor_param *par)  	kfree(ledinternal);  } -static struct xt_target led_tg_reg __read_mostly = { -	.name		= "LED", -	.revision	= 0, -	.family		= NFPROTO_UNSPEC, -	.target		= led_tg, -	.targetsize	= sizeof(struct xt_led_info), -	.usersize	= offsetof(struct xt_led_info, internal_data), -	.checkentry	= led_tg_check, -	.destroy	= led_tg_destroy, -	.me		= THIS_MODULE, +static struct xt_target led_tg_reg[] __read_mostly = { +	{ +		.name		= "LED", +		.revision	= 0, +		.family		= NFPROTO_IPV4, +		.target		= led_tg, +		.targetsize	= sizeof(struct xt_led_info), +		.usersize	= offsetof(struct xt_led_info, internal_data), +		.checkentry	= led_tg_check, +		.destroy	= led_tg_destroy, +		.me		= THIS_MODULE, +	}, +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) +	{ +		.name		= "LED", +		.revision	= 0, +		.family		= NFPROTO_IPV6, +		.target		= led_tg, +		.targetsize	= sizeof(struct xt_led_info), +		.usersize	= offsetof(struct xt_led_info, internal_data), +		.checkentry	= led_tg_check, +		.destroy	= led_tg_destroy, +		.me		= THIS_MODULE, +	}, +#endif  };  static int __init led_tg_init(void)  { -	return xt_register_target(&led_tg_reg); +	return xt_register_targets(led_tg_reg, ARRAY_SIZE(led_tg_reg));  }  static void __exit led_tg_exit(void)  { -	xt_unregister_target(&led_tg_reg); +	xt_unregister_targets(led_tg_reg, ARRAY_SIZE(led_tg_reg));  }  module_init(led_tg_init);  | 
