Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965554AbbEMT7r (ORCPT ); Wed, 13 May 2015 15:59:47 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47460 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964875AbbEMT7p (ORCPT ); Wed, 13 May 2015 15:59:45 -0400 Message-Id: In-Reply-To: <20150513124940.GB27366@unicorn.suse.cz> From: Michal Kubecek Subject: [PATCH net v2 0/2] IPv6 ECMP route add/replace fixes To: "David S. Miller" Cc: Nicolas Dichtel , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , roopa Date: Wed, 13 May 2015 21:59:41 +0200 (CEST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1079 Lines: 27 (1) When adding a nexthop of a multipath route fails (e.g. because of a conflict with an existing route), we are supposed to delete nexthops already added. However, currently we try to also delete all nexthops we haven't even tried to add yet so that a "ip route add" command can actually remove pre-existing routes if it fails. (2) Attempt to replace a multipath route results in a broken siblings linked list. Following commands (like "ip route del") can then either follow a link into freed memory or end in an infinite loop (if the slab object has been reused). Michal Kubecek (2): ipv6: do not delete previously existing ECMP routes if add fails ipv6: fix ECMP route replacement net/ipv6/ip6_fib.c | 17 ++++++++++++++--- net/ipv6/route.c | 11 +++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) -- 2.3.7 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/