Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44642C3B1BF for ; Mon, 17 Feb 2020 02:35:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 196CA20718 for ; Mon, 17 Feb 2020 02:35:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726634AbgBQCff (ORCPT ); Sun, 16 Feb 2020 21:35:35 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:47824 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbgBQCff (ORCPT ); Sun, 16 Feb 2020 21:35:35 -0500 Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 91F9D153808F4; Sun, 16 Feb 2020 18:35:34 -0800 (PST) Date: Sun, 16 Feb 2020 18:35:34 -0800 (PST) Message-Id: <20200216.183534.1660526654373190891.davem@davemloft.net> To: bpoirier@cumulusnetworks.com Cc: netdev@vger.kernel.org, mkubecek@suse.cz, nicolas.dichtel@6wind.com, dsahern@gmail.com Subject: Re: [PATCH net 2/2] ipv6: Fix nlmsg_flags when splitting a multipath route From: David Miller In-Reply-To: <20200212014107.110066-2-bpoirier@cumulusnetworks.com> References: <20200212014107.110066-1-bpoirier@cumulusnetworks.com> <20200212014107.110066-2-bpoirier@cumulusnetworks.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 16 Feb 2020 18:35:34 -0800 (PST) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Benjamin Poirier Date: Wed, 12 Feb 2020 10:41:07 +0900 > When splitting an RTA_MULTIPATH request into multiple routes and adding the > second and later components, we must not simply remove NLM_F_REPLACE but > instead replace it by NLM_F_CREATE. Otherwise, it may look like the netlink > message was malformed. > > For example, > ip route add 2001:db8::1/128 dev dummy0 > ip route change 2001:db8::1/128 nexthop via fe80::30:1 dev dummy0 \ > nexthop via fe80::30:2 dev dummy0 > results in the following warnings: > [ 1035.057019] IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE > [ 1035.057517] IPv6: NLM_F_CREATE should be set when creating new route > > This patch makes the nlmsg sequence look equivalent for __ip6_ins_rt() to > what it would get if the multipath route had been added in multiple netlink > operations: > ip route add 2001:db8::1/128 dev dummy0 > ip route change 2001:db8::1/128 nexthop via fe80::30:1 dev dummy0 > ip route append 2001:db8::1/128 nexthop via fe80::30:2 dev dummy0 > > Fixes: 27596472473a ("ipv6: fix ECMP route replacement") > Signed-off-by: Benjamin Poirier Applied and queued up for -stable.