From patchwork Wed Jan 9 14:36:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain KUNTZ X-Patchwork-Id: 210714 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2426D2C00C1 for ; Thu, 10 Jan 2013 01:42:01 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757934Ab3AIOlm (ORCPT ); Wed, 9 Jan 2013 09:41:42 -0500 Received: from mail-bk0-f44.google.com ([209.85.214.44]:59034 "EHLO mail-bk0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757847Ab3AIOll convert rfc822-to-8bit (ORCPT ); Wed, 9 Jan 2013 09:41:41 -0500 Received: by mail-bk0-f44.google.com with SMTP id w11so946001bku.3 for ; Wed, 09 Jan 2013 06:41:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipflavors.com; s=google; h=x-received:from:content-type:content-transfer-encoding:subject:date :message-id:cc:to:mime-version:x-mailer; bh=hwoXYc+oQhT9Mj5t5HEFd7cLftVyatMeXAOh2uSfnmw=; b=JFXFWHwGP9QQe8NjuxaVvF94xpzBJs3hgbBuEIde7hlHIpcOoe7pMG4j4+Fr7M9Mfi R8aPX7YvaIHdTVA02pWLukMguIJEzeNL6AhN6TavOKwjuHN3RMqb0EaFZFPGRst6GJmC V1IMnd0wRjPOxEf3YlNLJl7VMZspkullG7wAA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:content-type:content-transfer-encoding:subject:date :message-id:cc:to:mime-version:x-mailer:x-gm-message-state; bh=hwoXYc+oQhT9Mj5t5HEFd7cLftVyatMeXAOh2uSfnmw=; b=ZyUI+dr2hhkDAWwR/Tm9Crw0L8toLrKXvYtKKu2HvQLJvCKo/VKZR4DC5eXQK86K0p KvuhQBLLs7+rGBMgeZB6IW/KOAjVumwja842Xuqis7DkhIzMafmoNoWEBYv+KwjKRRZ/ UaEA4jyNqxE3ZSuooNiqG2t4HIXgKZHeEd7w/+7icC5rydzJ+IVJwRFE9uutNyE2bICt srMETCMvjj4SifuPP4GHk4ptP7rptZElW16W+7E10w3psx78SWn0EXORJLRxMK4ad2gj Ya0Ycnxl1ENdzqOH8plwqqZhiiRgNWa+zzd0BJn9xg68vudypnlo/HGbeGpz/60hBvLI wwzg== X-Received: by 10.204.147.22 with SMTP id j22mr33210535bkv.66.1357742499877; Wed, 09 Jan 2013 06:41:39 -0800 (PST) Received: from [192.168.1.24] (bro67-1-87-91-122-114.dsl.sta.abo.bbox.fr. [87.91.122.114]) by mx.google.com with ESMTPS id r16sm48813972bkv.3.2013.01.09.06.41.38 (version=SSLv3 cipher=OTHER); Wed, 09 Jan 2013 06:41:38 -0800 (PST) From: Romain KUNTZ Subject: [PATCH 1/1] ipv6: fix the noflags test in addrconf_get_prefix_route Date: Wed, 9 Jan 2013 15:36:40 +0100 Message-Id: <470C14E4-2866-4C55-89A3-D6751E1587C4@ipflavors.com> Cc: YOSHIFUJI Hideaki , "davem@davemloft.net" , linux-kernel@vger.kernel.org, Andreas Hofmeister , Romain KUNTZ To: "netdev@vger.kernel.org" Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) X-Mailer: Apple Mail (2.1499) X-Gm-Message-State: ALoCoQk80Tj/O7elG1kcv88gZbLDMSJcp2/Wyi26smUcy1DEWHzyVmoxnGMyOLJ+MCSj1wOZdONU Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From e7ece201c35615c44a3cfdc10ee28ad5a5878f41 Mon Sep 17 00:00:00 2001 From: Romain Kuntz Date: Wed, 9 Jan 2013 15:02:26 +0100 Subject: [PATCH 1/1] ipv6: fix the noflags test in addrconf_get_prefix_route The tests on the flags in addrconf_get_prefix_route() does no make much sense: the 'noflags' parameter contains the set of flags that must not match with the route flags, so the test must be done against 'noflags', and not against 'flags'. Signed-off-by: Romain Kuntz Acked-by: YOSHIFUJI Hideaki --- net/ipv6/addrconf.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 408cac4a..29ba4ff 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1877,7 +1877,7 @@ static struct rt6_info *addrconf_get_prefix_route(const struct in6_addr *pfx, continue; if ((rt->rt6i_flags & flags) != flags) continue; - if ((noflags != 0) && ((rt->rt6i_flags & flags) != 0)) + if ((rt->rt6i_flags & noflags) != 0) continue; dst_hold(&rt->dst); break;