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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADxym3YzJPRDPCz5rN7uQC6MNSo+FnGPB5sg2hVv+WOZj18PKg@mail.gmail.com>
Date: Thu, 31 Jul 2025 20:19:49 +0800
From: Menglong Dong <menglong8.dong@...il.com>
To: Ido Schimmel <idosch@...sch.org>
Cc: dsahern@...nel.org, andrew+netdev@...n.ch, davem@...emloft.net, 
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com, 
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: vrf: don't down netif when add slave

On Thu, Jul 31, 2025 at 8:08 PM Ido Schimmel <idosch@...sch.org> wrote:
>
> On Thu, Jul 31, 2025 at 07:22:19PM +0800, Menglong Dong wrote:
> > For now, cycle_netdev() will be called to flush the neighbor cache when
> > add slave by downing and upping the slave netdev. When the slave has
> > vlan devices, the data transmission can interrupted.
> >
> > Optimize it by notifying the NETDEV_CHANGEADDR instead, which will also
> > flush the neighbor cache. It's a little ugly, and maybe we can introduce
> > a new event to do such flush :/
>
> Cycling the netdev is not only about neighbors, but also about moving
> routes to the correct table (see the comment above the function):
>
> ip link add name dummy1 up type dummy
> sysctl -wq net.ipv6.conf.dummy1.keep_addr_on_down=1
> ip address add 192.0.2.1/24 dev dummy1
> ip address add 2001:db8:1::1/64 dev dummy1
> ip link add name vrf1 up type vrf table 100
> ip link set dev dummy1 master vrf1
> ip -4 route show table 100
> 192.0.2.0/24 dev dummy1 proto kernel scope link src 192.0.2.1
> local 192.0.2.1 dev dummy1 proto kernel scope host src 192.0.2.1
> broadcast 192.0.2.255 dev dummy1 proto kernel scope link src 192.0.2.1
> ip -6 route show table 100
> local 2001:db8:1::1 dev dummy1 proto kernel metric 0 pref medium
> 2001:db8:1::/64 dev dummy1 proto kernel metric 256 pref medium
> local fe80::f877:f7ff:fecb:bfb dev dummy1 proto kernel metric 0 pref medium
> fe80::/64 dev dummy1 proto kernel metric 256 pref medium
> multicast ff00::/8 dev dummy1 proto kernel metric 256 pref medium
>
> And it doesn't happen with your patch:
>
> ip link add name dummy1 up type dummy
> sysctl -wq net.ipv6.conf.dummy1.keep_addr_on_down=1
> ip address add 192.0.2.1/24 dev dummy1
> ip address add 2001:db8:1::1/64 dev dummy1
> ip link add name vrf1 up type vrf table 100
> ip link set dev dummy1 master vrf1
> ip -4 route show table 100
> ip -6 route show table 100

You are right, something is missing in this patch :/

>
> You can try configuring the VLAN devices with "loose_binding on".

Great! I'll have a try on this param.

Thanks!
Menglong Dong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ