ia64/linux-2.6.18-xen.hg

view net/netfilter/xt_comment.c @ 871:9cbcc9008446

xen/x86: don't initialize cpu_data[]'s apicid field on generic code

Afaict, this is not only redundant with the intialization done in
drivers/xen/core/smpboot.c, but actually results - at least for
secondary CPUs - in the Xen-specific value written to be later
overwritten with whatever the generic code determines (with no
guarantee that the two values are identical).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu May 14 10:09:15 2009 +0100 (2009-05-14)
parents 831230e53067
children
line source
1 /*
2 * Implements a dummy match to allow attaching comments to rules
3 *
4 * 2003-05-13 Brad Fisher (brad@info-link.net)
5 */
7 #include <linux/module.h>
8 #include <linux/skbuff.h>
9 #include <linux/netfilter/x_tables.h>
10 #include <linux/netfilter/xt_comment.h>
12 MODULE_AUTHOR("Brad Fisher <brad@info-link.net>");
13 MODULE_DESCRIPTION("iptables comment match module");
14 MODULE_LICENSE("GPL");
15 MODULE_ALIAS("ipt_comment");
16 MODULE_ALIAS("ip6t_comment");
18 static int
19 match(const struct sk_buff *skb,
20 const struct net_device *in,
21 const struct net_device *out,
22 const struct xt_match *match,
23 const void *matchinfo,
24 int offset,
25 unsigned int protooff,
26 int *hotdrop)
27 {
28 /* We always match */
29 return 1;
30 }
32 static struct xt_match comment_match = {
33 .name = "comment",
34 .match = match,
35 .matchsize = sizeof(struct xt_comment_info),
36 .family = AF_INET,
37 .me = THIS_MODULE
38 };
40 static struct xt_match comment6_match = {
41 .name = "comment",
42 .match = match,
43 .matchsize = sizeof(struct xt_comment_info),
44 .family = AF_INET6,
45 .me = THIS_MODULE
46 };
48 static int __init xt_comment_init(void)
49 {
50 int ret;
52 ret = xt_register_match(&comment_match);
53 if (ret)
54 return ret;
56 ret = xt_register_match(&comment6_match);
57 if (ret)
58 xt_unregister_match(&comment_match);
60 return ret;
61 }
63 static void __exit xt_comment_fini(void)
64 {
65 xt_unregister_match(&comment_match);
66 xt_unregister_match(&comment6_match);
67 }
69 module_init(xt_comment_init);
70 module_exit(xt_comment_fini);