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: <20240819143524.wjuevpejxgqh3hws@skbuf>
Date: Mon, 19 Aug 2024 17:35:24 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Pieter <vtpieter@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, Woojung Huh <woojung.huh@...rochip.com>,
	UNGLinuxDriver@...rochip.com,
	Florian Fainelli <f.fainelli@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Russell King <linux@...linux.org.uk>,
	Pieter Van Trappen <pieter.van.trappen@...n.ch>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: dsa: microchip: add KSZ8
 change_tag_protocol support

On Mon, Aug 19, 2024 at 04:20:31PM +0200, Pieter wrote:
> Hi Vladimir,
> 
> > On Mon, Aug 19, 2024 at 03:43:42PM +0200, Pieter wrote:
> > > Right so I'm managing it but I don't care from which port the packets
> > > originate, so I could disable the tagging in my case.
> > >
> > > My problem is that with tagging enabled, I cannot use the DSA conduit
> > > interface as a regular one to open sockets etc.
> >
> > Open the socket on the bridge interface then?
> 
> Assuming this works,

You don't have to "assume" it works. You can test and verify that it works.
We have a selftest for receiving all kinds of packets on standalone and
bridged interfaces.
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/tree/tools/testing/selftests/net/forwarding/local_termination.sh

> how to tell all user space programs to use br0 instead of eth0?

Question does not compute, sorry. Is this answer what you're looking for?
"Just like you tell them to use eth0, just that instead of eth0 you type br0".
Or just like Andrew says. You don't explicitly bind IP sockets to
interfaces, you let the routing layer pick the interface based on the
routing table and the IP addresses on each interface. Ergo, for IP
sockets you just need to put your IP address on the bridge interface.

> Both interfaces are up and I can't do `ifdown eth0` without losing
> all connectivity. I'm using busybox's ifup BTW and it says:
> $ ifup br0
> ifup: ignoring unknown interface br0

busybox ifupdown reads the /etc/network/interfaces, it's saying that
interface isn't there. Which it really isn't, maybe? I haven't really
used busybox ifupdown and I don't know what it can do with bridges.

The basic command to bring a network interface up is "ip link set dev $NAME up".
This has no state/configuration file and just constructs netlink
messages to pass through the rtnetlink socket to the kernel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ