diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/skbuff.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 23bad3bf3c..fe2c58e530 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -210,6 +210,7 @@ enum { | |||
| 210 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 210 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
| 211 | * @tc_index: Traffic control index | 211 | * @tc_index: Traffic control index |
| 212 | * @tc_verd: traffic control verdict | 212 | * @tc_verd: traffic control verdict |
| 213 | * @secmark: security marking | ||
| 213 | */ | 214 | */ |
| 214 | 215 | ||
| 215 | struct sk_buff { | 216 | struct sk_buff { |
| @@ -289,6 +290,9 @@ struct sk_buff { | |||
| 289 | #ifdef CONFIG_NET_DMA | 290 | #ifdef CONFIG_NET_DMA |
| 290 | dma_cookie_t dma_cookie; | 291 | dma_cookie_t dma_cookie; |
| 291 | #endif | 292 | #endif |
| 293 | #ifdef CONFIG_NETWORK_SECMARK | ||
| 294 | __u32 secmark; | ||
| 295 | #endif | ||
| 292 | 296 | ||
| 293 | 297 | ||
| 294 | /* These elements must be at the end, see alloc_skb() for details. */ | 298 | /* 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) | |||
| 1400 | static inline void nf_reset(struct sk_buff *skb) {} | 1404 | static inline void nf_reset(struct sk_buff *skb) {} |
| 1401 | #endif /* CONFIG_NETFILTER */ | 1405 | #endif /* CONFIG_NETFILTER */ |
| 1402 | 1406 | ||
| 1407 | #ifdef CONFIG_NETWORK_SECMARK | ||
| 1408 | static inline void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from) | ||
| 1409 | { | ||
| 1410 | to->secmark = from->secmark; | ||
| 1411 | } | ||
| 1412 | |||
| 1413 | static inline void skb_init_secmark(struct sk_buff *skb) | ||
| 1414 | { | ||
| 1415 | skb->secmark = 0; | ||
| 1416 | } | ||
| 1417 | #else | ||
| 1418 | static inline void skb_copy_secmark(struct sk_buff *to, const struct sk_buff *from) | ||
| 1419 | { } | ||
| 1420 | |||
| 1421 | static inline void skb_init_secmark(struct sk_buff *skb) | ||
| 1422 | { } | ||
| 1423 | #endif | ||
| 1424 | |||
| 1403 | #endif /* __KERNEL__ */ | 1425 | #endif /* __KERNEL__ */ |
| 1404 | #endif /* _LINUX_SKBUFF_H */ | 1426 | #endif /* _LINUX_SKBUFF_H */ |
