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: <20210903200803.GZ22278@shell.armlinux.org.uk>
Date:   Fri, 3 Sep 2021 21:08:03 +0100
From:   "Russell King (Oracle)" <linux@...linux.org.uk>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Vladimir Oltean <olteanv@...il.com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH net-next 0/3] Make the PHY library stop being so
 greedy when binding the generic PHY driver

On Fri, Sep 03, 2021 at 09:56:01PM +0200, Andrew Lunn wrote:
> On Fri, Sep 03, 2021 at 07:58:50PM +0100, Russell King (Oracle) wrote:
> > On Fri, Sep 03, 2021 at 07:21:19PM +0200, Andrew Lunn wrote:
> > > Hi Russell
> > > 
> > > Do you have
> > > 
> > > auto brdsl
> > > 
> > > in your /etc/network/interfaces?
> > > 
> > > Looking at /lib/udev/bridge-network-interface it seems it will only do
> > > hotplug of interfaces if auto is set on the bridge interface. Without
> > > auto, it only does coldplug. So late appearing switch ports won't get
> > > added.
> > 
> > I think you're looking at this:
> > 
> > [ "$BRIDGE_HOTPLUG" = "no" ] && exit 0
> > 
> > ?
> 
> No, i was meaning this bit:
> 
>    for i in $(ifquery --list --allow auto); do
>         ports=$(ifquery $i | sed -n -e's/^bridge[_-]ports: //p')
> 
> Inside this is the actual adding of the interface to the bridge:
> 
>                                         brctl addif $i $port && ip link set dev $port up
> 
> 
> $ /sbin/ifquery --list --allow auto
> lo
> eth0
> br42
> 
> I have various tap interfaces for VMs which get added to br42 when
> they appear.

For the for loop to be reached, you needed to have set BRIDGE_HOTPLUG
to "yes" in /etc/default/bridge-utils, which otherwise defaults to "no"
and disables this script. So, to make that work you need to both
set BRIDGE_HOTPLUG=yes, and also set the bridge device to "auto" mode.

However, the danger with setting the bridge device to "auto" mode is
that then the CPU network device is not brought up before the bridge.
It's undocumented what order ifup -a processes the devices it finds
marked as "auto". I've been there in the past, which is why I ended
up with what I presently have.

I'm also wondering what the ordering is with bridge-network-interface
vs networking.service, and whether bridge-network-interface can run
before the bridge device has been created - in which case "brctl
addif" will fail and spit stuff on stderr... which isn't nice.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ