Exemple #1
0
static int __init socket_mt_init(void)
{
	nf_defrag_ipv4_enable();
#ifdef XT_SOCKET_HAVE_IPV6
	nf_defrag_ipv6_enable();
#endif
	return xt_register_matches(socket_mt_reg, ARRAY_SIZE(socket_mt_reg));
}
Exemple #2
0
static int __init socket_mt_init(void)
{
	nf_defrag_ipv4_enable();
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
	nf_defrag_ipv6_enable();
#endif

	return xt_register_matches(socket_mt_reg, ARRAY_SIZE(socket_mt_reg));
}
static int __init quota_mt2_init(void)
{
	int ret;

	proc_xt_quota = proc_mkdir("xt_quota", init_net.proc_net);
	if (proc_xt_quota == NULL)
		return -EACCES;

	ret = xt_register_matches(quota_mt2_reg, ARRAY_SIZE(quota_mt2_reg));
	if (ret < 0)
		remove_proc_entry("xt_quota", init_net.proc_net);
	return ret;
}
Exemple #4
0
static int __init xt_set_init(void)
{
	int ret = xt_register_matches(set_matches, ARRAY_SIZE(set_matches));

	if (!ret) {
		ret = xt_register_targets(set_targets,
					  ARRAY_SIZE(set_targets));
		if (ret)
			xt_unregister_matches(set_matches,
					      ARRAY_SIZE(set_matches));
	}
	return ret;
}
Exemple #5
0
static int __init dccp_mt_init(void)
{
	int ret;

	
	dccp_optbuf = kmalloc(256 * 4, GFP_KERNEL);
	if (!dccp_optbuf)
		return -ENOMEM;
	ret = xt_register_matches(dccp_mt_reg, ARRAY_SIZE(dccp_mt_reg));
	if (ret)
		goto out_kfree;
	return ret;

out_kfree:
	kfree(dccp_optbuf);
	return ret;
}
Exemple #6
0
static int __init dccp_mt_init(void)
{
	int ret;

	/* doff is 8 bits, so the maximum option size is (4*256).  Don't put
	 * this in BSS since DaveM is worried about locked TLB's for kernel
	 * BSS. */
	dccp_optbuf = kmalloc(256 * 4, GFP_KERNEL);
	if (!dccp_optbuf)
		return -ENOMEM;
	ret = xt_register_matches(dccp_mt_reg, ARRAY_SIZE(dccp_mt_reg));
	if (ret)
		goto out_kfree;
	return ret;

out_kfree:
	kfree(dccp_optbuf);
	return ret;
}
Exemple #7
0
static int __init quota_mt2_init(void)
{
	int ret;
	pr_debug("xt_quota2: init()");

#ifdef CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG
	nflognl = netlink_kernel_create(&init_net, NETLINK_NFLOG, NULL);
	if (!nflognl)
		return -ENOMEM;
#endif

	proc_xt_quota = proc_mkdir("xt_quota", init_net.proc_net);
	if (proc_xt_quota == NULL)
		return -EACCES;

	ret = xt_register_matches(quota_mt2_reg, ARRAY_SIZE(quota_mt2_reg));
	if (ret < 0)
		remove_proc_entry("xt_quota", init_net.proc_net);
	pr_debug("xt_quota2: init() %d", ret);
	return ret;
}
Exemple #8
0
/*
 * vlantag_init()
 *	Module init function.
 */
static int __init vlantag_init(void)
{
	int ret;

	offload_vlantag_register(vlantag_get_target_info);

	ret = xt_register_matches(vlantag_pre, ARRAY_SIZE(vlantag_pre));
	if (ret < 0) {
		DEBUGP("failed to register vlantag_pre\n");
		return ret;
	}

	ret = xt_register_targets(vlantag_post, ARRAY_SIZE(vlantag_post));
	if (ret < 0) {
		DEBUGP("failed to register vlantag_post\n");
		xt_unregister_matches(vlantag_pre, ARRAY_SIZE(vlantag_pre));
		return ret;
	}

	DEBUGP("vlantag_tg_init success\n");

	return 0;
}
Exemple #9
0
static int __init xt_comment_init(void)
{
	return xt_register_matches(xt_comment_match,
				   ARRAY_SIZE(xt_comment_match));
}
Exemple #10
0
static int __init policy_mt_init(void)
{
	return xt_register_matches(policy_mt_reg, ARRAY_SIZE(policy_mt_reg));
}
static int __init addrtype_mt_init(void)
{
	return xt_register_matches(addrtype_mt_reg,
				   ARRAY_SIZE(addrtype_mt_reg));
}
Exemple #12
0
static int __init multiport_mt_init(void)
{
	return xt_register_matches(multiport_mt_reg,
	       ARRAY_SIZE(multiport_mt_reg));
}
Exemple #13
0
static int __init l2tp_mt_init(void)
{
	return xt_register_matches(&l2tp_mt_reg[0], ARRAY_SIZE(l2tp_mt_reg));
}
Exemple #14
0
static int __init bpf_mt_init(void)
{
	return xt_register_matches(bpf_mt_reg, ARRAY_SIZE(bpf_mt_reg));
}
Exemple #15
0
static int __init tcpmss_mt_init(void)
{
	return xt_register_matches(tcpmss_mt_reg, ARRAY_SIZE(tcpmss_mt_reg));
}
Exemple #16
0
static int __init xt_tcpmss_init(void)
{
	return xt_register_matches(xt_tcpmss_match,
				   ARRAY_SIZE(xt_tcpmss_match));
}
Exemple #17
0
static int __init xt_ethport_match_init(void)
{
	return xt_register_matches(xt_ethport_match, ARRAY_SIZE(xt_ethport_match));
}
static int __init xt_physdev_init(void)
{
	return xt_register_matches(xt_physdev_match,
				   ARRAY_SIZE(xt_physdev_match));
}
Exemple #19
0
static int __init length_mt_init(void)
{
    return xt_register_matches(length_mt_reg, ARRAY_SIZE(length_mt_reg));
}
Exemple #20
0
static int __init xt_u32_init(void)
{
	return xt_register_matches(u32_reg, ARRAY_SIZE(u32_reg));
}
Exemple #21
0
static int __init xt_pkttype_init(void)
{
	return xt_register_matches(xt_pkttype_match,
				   ARRAY_SIZE(xt_pkttype_match));
}
Exemple #22
0
static int __init xt_string_init(void)
{
	return xt_register_matches(xt_string_match, ARRAY_SIZE(xt_string_match));
}
Exemple #23
0
static int __init xt_length_init(void)
{
	return xt_register_matches(xt_length_match,
				   ARRAY_SIZE(xt_length_match));
}
Exemple #24
0
static int __init dns_init(void)
{
	printk("registering %s %s\n", "xt_dns", VERSION);
	return xt_register_matches(dns_reg, ARRAY_SIZE(dns_reg));
}
static int __init xt_quota_init(void)
{
	return xt_register_matches(xt_quota_match, ARRAY_SIZE(xt_quota_match));
}
Exemple #26
0
static int __init comp_mt_init(void)
{
	return xt_register_matches(comp_mt_reg, ARRAY_SIZE(comp_mt_reg));
}
Exemple #27
0
static int __init string_mt_init(void)
{
    return xt_register_matches(string_mt_reg, ARRAY_SIZE(string_mt_reg));
}
Exemple #28
0
static int __init init(void)
{
	return xt_register_matches(xt_policy_match,
				   ARRAY_SIZE(xt_policy_match));
}
Exemple #29
0
static int __init iprange_mt_init(void)
{
	return xt_register_matches(iprange_mt_reg, ARRAY_SIZE(iprange_mt_reg));
}
Exemple #30
0
static int __init xt_iface_match_init(void)
{
	return xt_register_matches(xt_iface_mt_reg,
		ARRAY_SIZE(xt_iface_mt_reg));
}