From patchwork Mon Sep 24 09:16:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17502 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id EB84F82FD1; Mon, 24 Sep 2018 11:16:19 +0200 (CEST) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="XEt5tMSQ"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 260BC82F0D for ; Mon, 24 Sep 2018 11:16:17 +0200 (CEST) Received: from sven-desktop.home.narfation.org (p5B34CCA4.dip0.t-ipconnect.de [91.52.204.164]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id F0B11110005; Mon, 24 Sep 2018 11:16:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1537780577; bh=Mezob6YG2AhgmS4qU9UEuRCCQ7Cy04QnQiuWljiTw4o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XEt5tMSQzjLcij6kQLeR0UFy+1MWTLWgfNJuSXkxdeXSczjP6EFXwkXqxs+BL4Ux8 DwSPeIO4Dkg7jgTUyMFBAgg6WXRxhyhYHWxdn9w9yXJsU8b5XwAVNAMHJ4i4SY3W4w CagMY3/2odULXMBEotDmtke3HwrMnMnPqz6rdrvo= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 24 Sep 2018 11:16:09 +0200 Message-Id: <20180924091609.20794-2-sven@narfation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180924091609.20794-1-sven@narfation.org> References: <20180924091609.20794-1-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH maint 2/2] batman-adv: Fix colliding redefinition of skb_postpush_rcsum X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" 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 Signed-off-by: Sven Eckelmann --- compat-include/linux/skbuff.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compat-include/linux/skbuff.h b/compat-include/linux/skbuff.h index 36e4d10d..376ea10b 100644 --- a/compat-include/linux/skbuff.h +++ b/compat-include/linux/skbuff.h @@ -45,16 +45,18 @@ 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)