On Mon, Apr 14, 2025, 18:47 Hadmut Danisch <had...@danisch.de> wrote:
> > On 14.04.25 18:36, Mantas Mikulėnas wrote: > > I don't remember seeing client-mode wlan interfaces working as bridge > > members on regular Linux kernel. Did that change recently? > > > I actually didn't try it recently with systemd, but I remember > positively, that I had used it before systemd (years ago), and if I > remember correctly, when trying the tests, I was able to configure the > wifi interface as a client with netplan/networkd, and manually put it > into a bridge. > > > After all: How do Linux based routers like OpenWRT do this? It can't be > regular routing, if ethernet and wifi do share the same address range. > I know some products like Mikrotik or Ubiquiti proprietary Linux-based firmware implement L2 NAT (i.e. MAC address masquerading) to emulate bridging of client-mode wlans, and I think I've heard of OpenWrt having a kernel patch for it, too. (Same goes for VirtualBox's custom bridge driver, as well as the built-in bridge feature in Windows: they can bridge client wlan interfaces because they have code to rewrite MAC addresses in flight.) Technically, semi-regular routing with lots of Proxy-ARP can also be used to imitate bridging; not sure if any products do that but I've seen software for it on github. Mostly though Linux-based routers are used to host an AP, and there's no issue with bridging an AP-mode interface. (Client-mode interfaces also become bridgeable when they're in the "4-address" mode, which Linux supports natively, but APs are likely to reject 4addr frames from clients unless manually set up to accept them. It's often also called "WDS bridge" mode.)