| .. | .. |
|---|
| 260 | 260 | u8 pkt_otherhost:1; |
|---|
| 261 | 261 | u8 in_prerouting:1; |
|---|
| 262 | 262 | u8 bridged_dnat:1; |
|---|
| 263 | + u8 sabotage_in_done:1; |
|---|
| 263 | 264 | __u16 frag_max_size; |
|---|
| 264 | 265 | struct net_device *physindev; |
|---|
| 265 | 266 | |
|---|
| .. | .. |
|---|
| 706 | 707 | * @transport_header: Transport layer header |
|---|
| 707 | 708 | * @network_header: Network layer header |
|---|
| 708 | 709 | * @mac_header: Link layer header |
|---|
| 710 | + * @kcov_handle: KCOV remote handle for remote coverage collection |
|---|
| 709 | 711 | * @tail: Tail pointer |
|---|
| 710 | 712 | * @end: End pointer |
|---|
| 711 | 713 | * @head: Head of buffer |
|---|
| .. | .. |
|---|
| 908 | 910 | __u16 transport_header; |
|---|
| 909 | 911 | __u16 network_header; |
|---|
| 910 | 912 | __u16 mac_header; |
|---|
| 913 | + |
|---|
| 914 | +#ifdef CONFIG_KCOV |
|---|
| 915 | + u64 kcov_handle; |
|---|
| 916 | +#endif |
|---|
| 911 | 917 | |
|---|
| 912 | 918 | /* private: */ |
|---|
| 913 | 919 | __u32 headers_end[0]; |
|---|
| .. | .. |
|---|
| 4207 | 4213 | #if IS_ENABLED(CONFIG_MPTCP) |
|---|
| 4208 | 4214 | SKB_EXT_MPTCP, |
|---|
| 4209 | 4215 | #endif |
|---|
| 4210 | | -#if IS_ENABLED(CONFIG_KCOV) |
|---|
| 4211 | | - SKB_EXT_KCOV_HANDLE, |
|---|
| 4212 | | -#endif |
|---|
| 4213 | 4216 | SKB_EXT_NUM, /* must be last */ |
|---|
| 4214 | 4217 | }; |
|---|
| 4215 | 4218 | |
|---|
| .. | .. |
|---|
| 4320 | 4323 | |
|---|
| 4321 | 4324 | static inline void nf_reset_trace(struct sk_buff *skb) |
|---|
| 4322 | 4325 | { |
|---|
| 4323 | | -#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES) |
|---|
| 4326 | +#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || IS_ENABLED(CONFIG_NF_TABLES) |
|---|
| 4324 | 4327 | skb->nf_trace = 0; |
|---|
| 4325 | 4328 | #endif |
|---|
| 4326 | 4329 | } |
|---|
| .. | .. |
|---|
| 4340 | 4343 | dst->_nfct = src->_nfct; |
|---|
| 4341 | 4344 | nf_conntrack_get(skb_nfct(src)); |
|---|
| 4342 | 4345 | #endif |
|---|
| 4343 | | -#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES) |
|---|
| 4346 | +#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || IS_ENABLED(CONFIG_NF_TABLES) |
|---|
| 4344 | 4347 | if (copy) |
|---|
| 4345 | 4348 | dst->nf_trace = src->nf_trace; |
|---|
| 4346 | 4349 | #endif |
|---|
| .. | .. |
|---|
| 4664 | 4667 | #endif |
|---|
| 4665 | 4668 | } |
|---|
| 4666 | 4669 | |
|---|
| 4667 | | -#if IS_ENABLED(CONFIG_KCOV) && IS_ENABLED(CONFIG_SKB_EXTENSIONS) |
|---|
| 4670 | +static inline bool skb_csum_is_sctp(struct sk_buff *skb) |
|---|
| 4671 | +{ |
|---|
| 4672 | + return skb->csum_not_inet; |
|---|
| 4673 | +} |
|---|
| 4674 | + |
|---|
| 4668 | 4675 | static inline void skb_set_kcov_handle(struct sk_buff *skb, |
|---|
| 4669 | 4676 | const u64 kcov_handle) |
|---|
| 4670 | 4677 | { |
|---|
| 4671 | | - /* Do not allocate skb extensions only to set kcov_handle to zero |
|---|
| 4672 | | - * (as it is zero by default). However, if the extensions are |
|---|
| 4673 | | - * already allocated, update kcov_handle anyway since |
|---|
| 4674 | | - * skb_set_kcov_handle can be called to zero a previously set |
|---|
| 4675 | | - * value. |
|---|
| 4676 | | - */ |
|---|
| 4677 | | - if (skb_has_extensions(skb) || kcov_handle) { |
|---|
| 4678 | | - u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE); |
|---|
| 4679 | | - |
|---|
| 4680 | | - if (kcov_handle_ptr) |
|---|
| 4681 | | - *kcov_handle_ptr = kcov_handle; |
|---|
| 4682 | | - } |
|---|
| 4678 | +#ifdef CONFIG_KCOV |
|---|
| 4679 | + skb->kcov_handle = kcov_handle; |
|---|
| 4680 | +#endif |
|---|
| 4683 | 4681 | } |
|---|
| 4684 | 4682 | |
|---|
| 4685 | 4683 | static inline u64 skb_get_kcov_handle(struct sk_buff *skb) |
|---|
| 4686 | 4684 | { |
|---|
| 4687 | | - u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE); |
|---|
| 4688 | | - |
|---|
| 4689 | | - return kcov_handle ? *kcov_handle : 0; |
|---|
| 4690 | | -} |
|---|
| 4685 | +#ifdef CONFIG_KCOV |
|---|
| 4686 | + return skb->kcov_handle; |
|---|
| 4691 | 4687 | #else |
|---|
| 4692 | | -static inline void skb_set_kcov_handle(struct sk_buff *skb, |
|---|
| 4693 | | - const u64 kcov_handle) { } |
|---|
| 4694 | | -static inline u64 skb_get_kcov_handle(struct sk_buff *skb) { return 0; } |
|---|
| 4695 | | -#endif /* CONFIG_KCOV && CONFIG_SKB_EXTENSIONS */ |
|---|
| 4688 | + return 0; |
|---|
| 4689 | +#endif |
|---|
| 4690 | +} |
|---|
| 4696 | 4691 | |
|---|
| 4697 | 4692 | #endif /* __KERNEL__ */ |
|---|
| 4698 | 4693 | #endif /* _LINUX_SKBUFF_H */ |
|---|