From: David Miller <davem@davemloft.net>
To: jarod@redhat.com
Cc: linux-kernel@vger.kernel.org, moshele@mellanox.com,
stephen@networkplumber.org, mleitner@redhat.com,
netdev@vger.kernel.org
Subject: Re: [PATCH net v2] ipv6: don't auto-add link-local address to lag ports
Date: Wed, 01 Apr 2020 11:14:27 -0700 (PDT) [thread overview]
Message-ID: <20200401.111427.789296252666544265.davem@davemloft.net> (raw)
In-Reply-To: <20200330152219.58296-1-jarod@redhat.com>
From: Jarod Wilson <jarod@redhat.com>
Date: Mon, 30 Mar 2020 11:22:19 -0400
> Bonding slave and team port devices should not have link-local addresses
> automatically added to them, as it can interfere with openvswitch being
> able to properly add tc ingress.
>
> Basic reproducer, courtesy of Marcelo:
...
> (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: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> 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: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> 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 added by commit c2edacf80e15, and
> results in an address getting added, while w/the proposed patch added,
> no address gets added. This simply adds the same gating check to another
> code path, and thus should prevent the same devices from erroneously
> obtaining an ipv6 link-local address.
>
> Fixes: d35a00b8e33d ("net/ipv6: allow sysctl to change link-local address generation mode")
> Reported-by: Moshe Levi <moshele@mellanox.com>
> CC: Stephen Hemminger <stephen@networkplumber.org>
> CC: Marcelo Ricardo Leitner <mleitner@redhat.com>
> CC: netdev@vger.kernel.org
> Signed-off-by: Jarod Wilson <jarod@redhat.com>
Applied and queued up for -stable, thanks.
prev parent reply other threads:[~2020-04-01 18:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 14:06 [PATCH net] " Jarod Wilson
2020-03-18 18:02 ` Eric Dumazet
2020-03-18 18:32 ` Jarod Wilson
2020-03-18 20:41 ` Jay Vosburgh
2020-03-19 16:42 ` Jarod Wilson
2020-03-19 17:05 ` Eric Dumazet
2020-03-19 19:29 ` Jarod Wilson
2020-03-19 19:52 ` Jay Vosburgh
2020-03-19 21:53 ` Jarod Wilson
2020-03-19 22:41 ` Stephen Hemminger
2020-03-23 17:25 ` Jarod Wilson
2020-03-30 15:22 ` [PATCH net v2] " Jarod Wilson
2020-04-01 18:14 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200401.111427.789296252666544265.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jarod@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mleitner@redhat.com \
--cc=moshele@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®