[NETFILTER]: nf_conntrack_sctp: remove timeout indirection
[sfrench/cifs-2.6.git] / net / netfilter / xt_CONNSECMARK.c
index 2c265e87f39655ba2e87a7799cc9006a6d5c4189..1faa9136195dbd7a8fde07dad72a55b6c758788b 100644 (file)
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter/xt_CONNSECMARK.h>
 #include <net/netfilter/nf_conntrack.h>
+#include <net/netfilter/nf_conntrack_ecache.h>
 
 #define PFX "CONNSECMARK: "
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("James Morris <jmorris@redhat.com>");
-MODULE_DESCRIPTION("ip[6]tables CONNSECMARK module");
+MODULE_DESCRIPTION("Xtables: target for copying between connection and security mark");
 MODULE_ALIAS("ipt_CONNSECMARK");
 MODULE_ALIAS("ip6t_CONNSECMARK");
 
@@ -40,8 +41,10 @@ static void secmark_save(const struct sk_buff *skb)
                enum ip_conntrack_info ctinfo;
 
                ct = nf_ct_get(skb, &ctinfo);
-               if (ct && !ct->secmark)
+               if (ct && !ct->secmark) {
                        ct->secmark = skb->secmark;
+                       nf_conntrack_event_cache(IPCT_SECMARK, skb);
+               }
        }
 }
 
@@ -103,7 +106,7 @@ connsecmark_tg_check(const char *tablename, const void *entry,
 
        if (nf_ct_l3proto_try_module_get(target->family) < 0) {
                printk(KERN_WARNING "can't load conntrack support for "
-                                   "proto=%d\n", target->family);
+                                   "proto=%u\n", target->family);
                return false;
        }
        return true;