Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3942075ybb; Mon, 23 Mar 2020 10:29:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuKTBExlC+5UredPgtvTlYrDluOn1euVpDpsP0J6GuSQMyQf/YtpL0fk0g7gAVZ/fRy+rmq X-Received: by 2002:aca:fcd6:: with SMTP id a205mr364503oii.28.1584984566997; Mon, 23 Mar 2020 10:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584984566; cv=none; d=google.com; s=arc-20160816; b=XGUpAzCi9QUyaB+qb1whGPv6FVW09bBFQ8b9tEQLFIXQUx3aW8iCni5QfihSy0DcdX t++V09H4KOex74FLMu/a4GAjbE+jRoYwYdgs4/99U95t1YrTHlmL/5ZmXHH0iZk3SzmN gXdpBoWLxe4dUhddFZWU8HwayWBzLyc0Mm1Lfvs++eEJWz32tRzMzWWTjMlLcCKlefi3 DDkS5POZXrypgtJ6BsaLvrOPb942vW5L1WFET1ZLDLlTCdBxmU6TUOFIqZkcjt8WfwXm CpkHq+Tp7RJA0OHxhl/H31lY0urOqt826f+wNqdzq7ci43iRFcHNf/OnU96MzpJEpLKZ AJUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=UNXvxtDhqBPk2mR0oo9iDMMgS94HHc3o9IyrbgMoY40=; b=AZI1hnVDvIOdUSvTylGRrtWFg0XRkogIFO3lIjinH+G/wZyrz3QwTSUF4KtnFn9o8o TdFMkaL89RsxHo36Q8CIU/bq1KUJP3UVMxVz3w5cOWoSKQQDS6+ri2r8Eq2Xi3Px7KOJ wBLomeTUnRsz+4w+V0Gj8x9z1N6uMYKXXF4umzclimfFXbPqbMOUg6KQJK3roPWGE+jw 2KIG777UJ+vOvSm1Mm9IeNJXs303rY0fTA52Q7IZObcH1yaGhVRtvoaoHgJT9Hlpl7wj GsYPJDGxQE0cKVtWmVFBwIgJNHTM4L9s3QGbIpTkzJB7WPfdNUDmaCKKmj9PSYRx+3AS MrYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C+EjHXiM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13si8580678otg.35.2020.03.23.10.29.03; Mon, 23 Mar 2020 10:29:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C+EjHXiM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727444AbgCWRZ5 (ORCPT + 99 others); Mon, 23 Mar 2020 13:25:57 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:42230 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727163AbgCWRZ4 (ORCPT ); Mon, 23 Mar 2020 13:25:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584984355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UNXvxtDhqBPk2mR0oo9iDMMgS94HHc3o9IyrbgMoY40=; b=C+EjHXiMRHZbnUkCJfCi8btLxWKy5oVsZixel3YxSU3Mg8BrctfazjMIFrev9qfVzK3nk0 jbZXs2XLqtKd6hCdGMCkOUVsE9xxignlOprYD6CE91dkKjYtFvM8T99WKjTgUHw4Um3LU0 bP+97hYu9jMjoRQH15DcQ6ye2oQZjUw= Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-340-WicShdodOl2EPtkz9HDEPA-1; Mon, 23 Mar 2020 13:25:45 -0400 X-MC-Unique: WicShdodOl2EPtkz9HDEPA-1 Received: by mail-il1-f199.google.com with SMTP id d2so13416931ilf.19 for ; Mon, 23 Mar 2020 10:25:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UNXvxtDhqBPk2mR0oo9iDMMgS94HHc3o9IyrbgMoY40=; b=tHDg7KDObLDsbD8BNsT5jQdY2M/5HhBtq6e47unzZ/pX2GaMouFmUhBMiCtI61Q4mi ivfNas+wxuhgqA0jqHlvzkFFIyWZ6+lK+DJCfbe6XU2VrpA7JAqgJq/757hnVsb+Prlk g5BUEnKfmzXYLdgi7eJQnh7rtA2um7GEVZtNi9jUNwojzUzUp47K6qGMz0MXtCyDl9pU 0kPke0ZZpt4V7E/SrRuIAvkygBBPS2mwB+pyXjZJTtuHQIL+5+Oyjd4uuM5TBmdSgR5K jnz/0hEBkZ1N2n0eJJXZ6Uetsd8RUXOshg+ZD56Z/qNFZPZC/CnBrflRUWemxIl8l6v+ eoUQ== X-Gm-Message-State: ANhLgQ3Rfyu547Cmuqk6zePqJr6eNKeWVqY296429bH0q4EqY1ctN4M4 cZrmj4UWjD8zYv1DSfewTf8EZo/EHz5NskMi7HH0FE81bR5VvQxigHuDjmWPt1h3zWaIu7mJsl1 YR+D5lZ/ofd9Ubcob7PoBfWymwWBiapiYt/hQTvq1 X-Received: by 2002:a92:3a0b:: with SMTP id h11mr22801955ila.4.1584984344361; Mon, 23 Mar 2020 10:25:44 -0700 (PDT) X-Received: by 2002:a92:3a0b:: with SMTP id h11mr22801940ila.4.1584984344100; Mon, 23 Mar 2020 10:25:44 -0700 (PDT) MIME-Version: 1.0 References: <20200318140605.45273-1-jarod@redhat.com> <8a88d1c8-c6b1-ad85-7971-e6ae8c6fa0e4@gmail.com> <25629.1584564113@famine> <3dbabf42-90e6-4c82-0b84-d1b1a9e8fadf@gmail.com> <20200319154108.2de87e34@hermes.lan> In-Reply-To: <20200319154108.2de87e34@hermes.lan> From: Jarod Wilson Date: Mon, 23 Mar 2020 13:25:33 -0400 Message-ID: Subject: Re: [PATCH net] ipv6: don't auto-add link-local address to lag ports To: Stephen Hemminger Cc: Eric Dumazet , Jay Vosburgh , LKML , Moshe Levi , Marcelo Ricardo Leitner , Netdev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 19, 2020 at 6:41 PM Stephen Hemminger wrote: > > On Thu, 19 Mar 2020 15:29:51 -0400 > Jarod Wilson wrote: > > > On Thu, Mar 19, 2020 at 1:06 PM Eric Dumazet wrote: > > > > > > On 3/19/20 9:42 AM, Jarod Wilson wrote: > > > > > > > Interesting. We'll keep digging over here, but that's definitely not > > > > working for this particular use case with OVS for whatever reason. > > > > > > I did a quick test and confirmed that my bonding slaves do not have link-local addresses, > > > without anything done to prevent them to appear. > > > > > > You might add a selftest, if you ever find what is the trigger :) > > > > Okay, have a basic reproducer, courtesy of Marcelo: > > > > # ip link add name bond0 type bond > > # ip link set dev ens2f0np0 master bond0 > > # ip link set dev ens2f1np2 master bond0 > > # ip link set dev bond0 up > > # ip a s > > 1: lo: mtu 65536 qdisc noqueue state UNKNOWN > > group default qlen 1000 > > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > > inet 127.0.0.1/8 scope host lo > > valid_lft forever preferred_lft forever > > inet6 ::1/128 scope host > > valid_lft forever preferred_lft forever > > 2: ens2f0np0: mtu 1500 qdisc > > mq master bond0 state UP group default qlen 1000 > > link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff > > 5: ens2f1np2: mtu 1500 qdisc > > mq master bond0 state DOWN group default qlen 1000 > > link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff > > 11: bond0: mtu 1500 qdisc > > noqueue state UP group default qlen 1000 > > link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff > > inet6 fe80::20f:53ff:fe2f:ea40/64 scope link > > valid_lft forever preferred_lft forever > > > > (above trimmed to relevant entries, obviously) > > > > # sysctl net.ipv6.conf.ens2f0np0.addr_gen_mode=0 > > net.ipv6.conf.ens2f0np0.addr_gen_mode = 0 > > # sysctl net.ipv6.conf.ens2f1np2.addr_gen_mode=0 > > net.ipv6.conf.ens2f1np2.addr_gen_mode = 0 > > > > # ip a l ens2f0np0 > > 2: ens2f0np0: mtu 1500 qdisc > > mq master bond0 state UP group default qlen 1000 > > link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff > > inet6 fe80::20f:53ff:fe2f:ea40/64 scope link tentative > > valid_lft forever preferred_lft forever > > # ip a l ens2f1np2 > > 5: ens2f1np2: mtu 1500 qdisc > > mq master bond0 state DOWN group default qlen 1000 > > link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff > > inet6 fe80::20f:53ff:fe2f:ea40/64 scope link tentative > > valid_lft forever preferred_lft forever > > > > Looks like addrconf_sysctl_addr_gen_mode() bypasses the original "is > > this a slave interface?" check, and results in an address getting > > added, while w/the proposed patch added, no address gets added. > > > > Looking back through git history again, I see a bunch of 'Fixes: > > d35a00b8e33d ("net/ipv6: allow sysctl to change link-local address > > generation mode")' patches, and I guess that's where this issue was > > also introduced. > > > > Yes the addrgen mode patches caused bad things to happen with hyper-v > sub devices. Addrconf code is very tricky to get right. > If you look back there have been a large number of changes where > a patch looks good, gets reviewed, merged, and then breaks something > and has to be reverted. > > Probably the original patch should just be reverted rather than > trying to add more here. I'm not prepared to do a full revert here myself, I don't know the code well enough, or what the ramifications might be. For v2, I was just going to propose a check-and-bail for devices with IFF_SLAVE set in addrconf_addr_gen(), to hopefully catch all the same devices the existing check from c2edacf80e15 caught, should they take this code pathway that skips that check. -- Jarod Wilson jarod@redhat.com