lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y5CVoc7vnKGg1KYj@nanopsycho>
Date:   Wed, 7 Dec 2022 14:31:13 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Xin Long <lucien.xin@...il.com>
Cc:     Stephen Hemminger <stephen@...workplumber.org>,
        network dev <netdev@...r.kernel.org>, davem@...emloft.net,
        kuba@...nel.org, Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>, LiLiang <liali@...hat.com>
Subject: Re: [PATCH net] team: prevent ipv6 link local address on port devices

Tue, Dec 06, 2022 at 10:52:33PM CET, lucien.xin@...il.com wrote:
>On Tue, Dec 6, 2022 at 8:32 AM Xin Long <lucien.xin@...il.com> wrote:
>>
>> On Tue, Dec 6, 2022 at 3:05 AM Jiri Pirko <jiri@...nulli.us> wrote:
>> >
>> > Mon, Dec 05, 2022 at 06:46:05PM CET, lucien.xin@...il.com wrote:
>> > >The similar fix from commit c2edacf80e15 ("bonding / ipv6: no addrconf
>> > >for slaves separately from master") is also needed in Team. Otherwise,
>> > >DAD and RS packets to be sent from the slaves in turn can confuse the
>> > >switches and cause them to incorrectly update their forwarding tables
>> > >as Liang noticed in the test with activebackup mode.
>> > >
>> > >Note that the patch also sets IFF_MASTER flag for Team dev accordingly
>> > >while IFF_SLAVE flag is set for port devs. Although IFF_MASTER flag is
>> > >not really used in Team, it's good to show in 'ip link':
>> > >
>> > >  eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP>
>> > >  team0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP>
>> > >
>> > >Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
>> > >Reported-by: LiLiang <liali@...hat.com>
>> > >Signed-off-by: Xin Long <lucien.xin@...il.com>
>> >
>> > Nack. Please don't do this. IFF_MASTER and IFF_SLAVE are historical
>> > flags used by bonding and eql. Should not be used for other devices.
>> I see. I was wondering why it was not used in Team at the beginning. :)
>>
>> >
>> > addrconf_addr_gen() should not check IFF_SLAVE. It should use:
>> > netif_is_lag_port() and netif_is_failover_slave() helpers.
>Hi Jiri,
>
>Sorry, it seems not to work with this.
>
>As addrconf_addr_gen() is also called in NETDEV_UP event where
>IFF_TEAM_PORT and IFF_BONDING haven't yet been set before
>dev_open() when adding the port.
>
>If we move IFF_TEAM_PORT setting ahead of dev_open(), it will revert
>the fix in:
>
>commit d7d3c05135f37d8fdf73f9966d27155cada36e56
>Author: Jiri Pirko <jiri@...nulli.us>
>Date:   Mon Aug 25 21:38:27 2014 +0200
>
>    team: set IFF_TEAM_PORT priv_flag after rx_handler is registered
>
>Can we keep IFF_SLAVE here only for no ipv6 addrconf?

So, shouldn't it be rather a new flag specifically for this purpose?


>or do you see a better solution?
>
>Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ