]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/netfilter/nf_conntrack_compat.h
[IPSEC]: Use HMAC template and hash interface
[linux-2.6-omap-h63xx.git] / include / net / netfilter / nf_conntrack_compat.h
index 3cac19fb36488c40a1c196a659a49e8e874450d8..f1b1482d7200a3a8a1d67e4c6cc41ba62167f125 100644 (file)
@@ -20,6 +20,19 @@ static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb,
 }
 #endif /* CONFIG_IP_NF_CONNTRACK_MARK */
 
+#ifdef CONFIG_IP_NF_CONNTRACK_SECMARK
+static inline u_int32_t *nf_ct_get_secmark(const struct sk_buff *skb,
+                                          u_int32_t *ctinfo)
+{
+       struct ip_conntrack *ct = ip_conntrack_get(skb, ctinfo);
+
+       if (ct)
+               return &ct->secmark;
+       else
+               return NULL;
+}
+#endif /* CONFIG_IP_NF_CONNTRACK_SECMARK */
+
 #ifdef CONFIG_IP_NF_CT_ACCT
 static inline struct ip_conntrack_counter *
 nf_ct_get_counters(const struct sk_buff *skb)
@@ -70,6 +83,19 @@ static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb,
 }
 #endif /* CONFIG_NF_CONNTRACK_MARK */
 
+#ifdef CONFIG_NF_CONNTRACK_SECMARK
+static inline u_int32_t *nf_ct_get_secmark(const struct sk_buff *skb,
+                                          u_int32_t *ctinfo)
+{
+       struct nf_conn *ct = nf_ct_get(skb, ctinfo);
+
+       if (ct)
+               return &ct->secmark;
+       else
+               return NULL;
+}
+#endif /* CONFIG_NF_CONNTRACK_MARK */
+
 #ifdef CONFIG_NF_CT_ACCT
 static inline struct ip_conntrack_counter *
 nf_ct_get_counters(const struct sk_buff *skb)