Re: [RFC,PATCH] netfilter: SNMP conntrack module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 2011-01-14 21:18, Jiri Olsa wrote:
>+
>+MODULE_AUTHOR("Jiri Olsa <jolsa@xxxxxxxxxx>");
>+MODULE_DESCRIPTION("SNMP service broadcast connection tracking helper");
>+MODULE_LICENSE("GPL");
>+MODULE_ALIAS("ip_conntrack_snmp");

This alias looks redundant given it's a new module, and there being
no autoloading by prefix like there currently is for iptables extensions.

>+static unsigned int timeout __read_mostly = 30;
>+module_param(timeout, uint, 0400);

400 -> S_IRUSR. We have the mnemonic constants, so should make use of them.

>+static struct nf_conntrack_helper helper __read_mostly = {
>+	.name			= "snmp",
>+	.tuple.src.l3num	= AF_INET,

 = NFPROTO_IPV4,

>+	.tuple.src.u.udp.port	= cpu_to_be16(SNMP_PORT),
>+	.tuple.dst.protonum	= IPPROTO_UDP,
>+	.me			= THIS_MODULE,
>+	.help			= help,
>+	.expect_policy		= &exp_policy,
>+};

I think it would a good idea to give the help function a better
name than "help". You know, when a stack trace comes up, it'll be
much more enlightening.

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux