Repository : ssh://git@open-mesh.org/batman-adv
On branch : master
commit f4b937ccc8e10dfe4f5514cf76379d2eb7394627 Author: Sven Eckelmann sven@narfation.org Date: Mon Sep 24 11:16:09 2018 +0200
batman-adv: Fix colliding redefinition of skb_postpush_rcsum
Linux >=4.4.47 have the function skb_postpush_rcsum already and also v3.16 got it with v3.16.57. Even older stable kernel versions might also have gotten this function with a stable release. Maintaining a full list of kernel versions which have this functionality is too much of a burden and thus the calls to this function are simply replaced with calls to a new private function batadv_skb_postpush_rcsum.
Reported-by: Andreas Ziegler dev@andreas-ziegler.de Signed-off-by: Sven Eckelmann sven@narfation.org
f4b937ccc8e10dfe4f5514cf76379d2eb7394627 compat-include/linux/skbuff.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/compat-include/linux/skbuff.h b/compat-include/linux/skbuff.h index 36e4d10..fbfd0e0 100644 --- a/compat-include/linux/skbuff.h +++ b/compat-include/linux/skbuff.h @@ -45,16 +45,19 @@ struct sk_buff *skb_checksum_trimmed(struct sk_buff *skb,
#endif /* < KERNEL_VERSION(4, 2, 0) */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 47) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
-static inline void skb_postpush_rcsum(struct sk_buff *skb, - const void *start, unsigned int len) +static inline void batadv_skb_postpush_rcsum(struct sk_buff *skb, + const void *start, + unsigned int len) { if (skb->ip_summed == CHECKSUM_COMPLETE) skb->csum = csum_block_add(skb->csum, csum_partial(start, len, 0), 0); }
+#define skb_postpush_rcsum batadv_skb_postpush_rcsum + #endif /* < KERNEL_VERSION(4, 5, 0) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)