From patchwork Wed May 20 19:04:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Olivari X-Patchwork-Id: 474603 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9A2E1140284 for ; Thu, 21 May 2015 05:04:44 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A16A0280642; Wed, 20 May 2015 21:03:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 1A6BF280222 for ; Wed, 20 May 2015 21:03:03 +0200 (CEST) X-policyd-weight: using cached result; rate: -7.6 Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 20 May 2015 21:03:02 +0200 (CEST) Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 0DD17141710; Wed, 20 May 2015 19:04:23 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id CCFC514172E; Wed, 20 May 2015 19:04:22 +0000 (UTC) Received: from mathieu-linux.qualcomm.com (qf-scl1nat.qualcomm.com [207.114.132.30]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mathieu@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A5E36141710; Wed, 20 May 2015 19:04:21 +0000 (UTC) From: Mathieu Olivari To: steven@midlink.org Date: Wed, 20 May 2015 12:04:07 -0700 Message-Id: <1432148647-21608-1-git-send-email-mathieu@codeaurora.org> X-Mailer: git-send-email 2.1.4 X-Virus-Scanned: ClamAV using ClamSMTP Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH] generic/4.0: fix error during kernel patch application X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Commit 5168c9a5702648eb690d32ec821647aca80aeba9 introduced a regression during patch application on the 4.0 kernel. Some of the patched content doesn't match the actual code, therefore leading to the following error: Applying patch generic/667-ipv6-Fixed-source-specific-default-route-handling.patch patching file net/ipv6/ip6_output.c Hunk #1 FAILED at 886. 1 out of 1 hunk FAILED -- rejects in file net/ipv6/ip6_output.c patching file net/ipv6/route.c Hunk #1 succeeded at 2247 (offset 2 lines). Patch generic/667-ipv6-Fixed-source-specific-default-route-handling.patch does not apply (enforce with -f) This change just adapts the actual patch to fix what is in kernel 4.0 and make it apply cleanly. Signed-off-by: Mathieu Olivari --- ...-ipv6-Fixed-source-specific-default-route-handling.patch | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/target/linux/generic/patches-4.0/667-ipv6-Fixed-source-specific-default-route-handling.patch b/target/linux/generic/patches-4.0/667-ipv6-Fixed-source-specific-default-route-handling.patch index b5cc76d..50ac1db 100644 --- a/target/linux/generic/patches-4.0/667-ipv6-Fixed-source-specific-default-route-handling.patch +++ b/target/linux/generic/patches-4.0/667-ipv6-Fixed-source-specific-default-route-handling.patch @@ -24,15 +24,13 @@ Signed-off-by: David S. Miller net/ipv6/route.c | 5 +++-- 2 files changed, 34 insertions(+), 10 deletions(-) -diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c -index 7fde1f2..c217775 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c -@@ -886,22 +886,45 @@ static int ip6_dst_lookup_tail(struct sock *sk, +@@ -883,22 +883,45 @@ static int ip6_dst_lookup_tail(struct so #endif int err; -- if (!*dst) +- if (*dst == NULL) - *dst = ip6_route_output(net, sk, fl6); - - err = (*dst)->error; @@ -82,11 +80,9 @@ index 7fde1f2..c217775 100644 #ifdef CONFIG_IPV6_OPTIMISTIC_DAD /* * Here if the dst entry we've looked up -diff --git a/net/ipv6/route.c b/net/ipv6/route.c -index 5c48293..d358888 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c -@@ -2245,9 +2245,10 @@ int ip6_route_get_saddr(struct net *net, +@@ -2247,9 +2247,10 @@ int ip6_route_get_saddr(struct net *net, unsigned int prefs, struct in6_addr *saddr) { @@ -99,6 +95,3 @@ index 5c48293..d358888 100644 *saddr = rt->rt6i_prefsrc.addr; else err = ipv6_dev_get_saddr(net, idev ? idev->dev : NULL, --- -2.1.4 -