|
@@ -210,6 +210,7 @@ enum {
|
|
|
* @nf_bridge: Saved data about a bridged frame - see br_netfilter.c
|
|
|
* @tc_index: Traffic control index
|
|
|
* @tc_verd: traffic control verdict
|
|
|
+ * @secmark: security marking
|
|
|
*/
|
|
|
|
|
|
struct sk_buff {
|
|
@@ -289,6 +290,9 @@ struct sk_buff {
|
|
|
#ifdef CONFIG_NET_DMA
|
|
|
dma_cookie_t dma_cookie;
|
|
|
#endif
|
|
|
+#ifdef CONFIG_NETWORK_SECMARK
|
|
|
+ __u32 secmark;
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
/* These elements must be at the end, see alloc_skb() for details. */
|
|
@@ -1400,5 +1404,23 @@ static inline void nf_reset(struct sk_buff *skb)
|
|
|
static inline void nf_reset(struct sk_buff *skb) {}
|
|
|
#endif /* CONFIG_NETFILTER */
|
|
|
|
|
|
+#ifdef CONFIG_NETWORK_SECMARK
|
|
|
+static inline void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from)
|
|
|
+{
|
|
|
+ to->secmark = from->secmark;
|
|
|
+}
|
|
|
+
|
|
|
+static inline void skb_init_secmark(struct sk_buff *skb)
|
|
|
+{
|
|
|
+ skb->secmark = 0;
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from)
|
|
|
+{ }
|
|
|
+
|
|
|
+static inline void skb_init_secmark(struct sk_buff *skb)
|
|
|
+{ }
|
|
|
+#endif
|
|
|
+
|
|
|
#endif /* __KERNEL__ */
|
|
|
#endif /* _LINUX_SKBUFF_H */
|