-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: bridge_isolate option in wireless interface configuration #7567
Comments
I can make a PR for this if needed. Is it just a flag called
I edited the original flag description a bit as well. |
That'd be great @Ramon00 - that can go in for 24. |
Thank you @Ramon00. From the docs (https://openwrt.org/docs/guide-user/network/wifi/basic) I got this info: I guess we can drop the dependencies on the I will try to test it tomorrow, if you have the time to update the PR. |
@JFroch yes I swapped the words, but I actually already fixed that before you wrote your comment. :) About dropping the dependencies. I am not sure. What would the point of this be if you have no AP mode? Either the dependency is for both or neither I would say. About the use of the word "radio", im not sure that if you write "interface" it is more clear. It could be misinterpreted as e.g. the lan interface? Somehow interface makes it sounds more broad. I guess "wireless-interface" would already be better? |
@Ramon00 Ahh sorry, I didn´t see you updated the PR. :) While I can´t think of any useful case at the moment, this is more of a "we shouldn´t limit the feature just because we can´t think of a use case" opinion I have. This is also why I initially proposed a more generic name, since it doesn´t really only isolate wireless clients, but could be applied to a mesh or wds-client interface as well and restrict another bridge port from accessing devices over that connection if wanted for some reason. Essentially it is the same as this option that can be set in Network->Interfaces->Devices just in a more convenient location, as you can just define it in the wireless interface settings. I agree on the last point, "wireless interface" would be a good fit and is already used in the menu. |
Ok lets use "wireless interface". How about the dependencies then? Remove it in both cases, i.e. for "isolate" and "bridge isolate"? Or would there be a reason to limit for one and not the other? |
Remove them just from "bridge_isolate", the "isolate" option is just applicable in the two AP modes according to the documentation. The isolation happens in two different places, one is blocking the communication directly on the same wireless interface while the other one happens at the bridge port level. Perhaps this illustrates it a bit more, |
I understand the concept, but just feels wrong to "leave it open because you never know" for the one, and then decide for the other "there is never any reason". I like consistency, that helps with understanding how things work. In the end the GUI should also provide the user with useful things that is know to work, not overwhelm with things that have no effect or even have an adverse effect. What happens if you enable this on a WDS client? I guess we need a 3rd person to vote on this :) |
I get where you are coming from and would agree, but I suspect this to be more of a technical limitation rather than an arbitrary one with hostapd not being used for client modes and perhaps not supporting/ignoring the As for enabling |
@systemcrash what do you think, remove the depends or not? |
I'm not familiar with the setting yet. Best is to trace it back to its introduction and ask the implementer its intended usage if it isn't documented in the wiki. |
@nbd168 Can you enlighten us? When is bridge_isolate option supposed to be function? Same depends as isolate or is it also useful in other situations? |
Might be worthwhile to dig in the code to figure out its usage. Felix is not frequently available if that's who you tagged. |
So the commit message says openwrt/netifd@f3e06e8
So it would seem that this option is indifferent to wifi modes, since the option affects bridge behaviour.
The |
If this is affecting bridge behavior only, i.e. independent of wifi, then this limits the packets to only go to the CPU where the bridge is located? Or can it go out a LAN port? If the affect is only limited to wifi device, and you have a WDS client which does outside world connection does it then stop this as well? |
I think it’s like that old internet cafe client isolation option. Access the world except for each other locally. It requires understanding the corresponding kernel option.. |
As I mentioned in a previous comment it does the same as the "Port Isolation" option for network interfaces. Quoting the description: "Only allow communication with non-isolated bridge ports when enabled"
That pretty much sums it up. |
Ok so, in 24 you can select for each bridge port and each bridged interface if it is isolated or not? This also means that "Prevents client-to-client communication over brige" is not (fully) describing what it is doing. "Prevents clients from contacting other wired or wireless clients on other isolated wired or wireless interfaces." |
Exactly, from what i´ve found the ability to configure the option in the Network tab in LUCI was added in 2020, while the 'bridge_isolate' option was added in 2023 and does work on 23.05.5, so it isn´t a 24 feature.
What about using the already existing description from the Network tab, or changing it to "Prevent communication with other isolated bridge ports."? Could that be too technical/confusing? |
Just say what you want as help text |
My reading of this setting from the original commit: bridge: add support for port isolation. Isolated ports cannot communicate between each other, but they can still communicate with non-isolated ports commit. I think this is the best we can do - since the intention of this setting seems to have been to turn this behaviour on, for a bridge port which connects to an AP. Other devices which have the same setting cannot directly communicate. So something like:
This avoids the baggage of wifi, or AP, or any other second-order implications of how it's all connected. I think @Ramon00's first suggestion is quite close to this, but @Ramon00's suggestion of What would you be satisfied with @JFroch ? If you can indeed confirm whether a client on an isolated port is no longer able to communicate with another client on the same isolated port, then @Ramon00's description is very fitting. ( The original commit mentions a source and destination port test, which leads me to believe that traffic originating and destined to the same port, which is 'isolated' would not be possible ) |
I would not call a wireless interface a |
Nor would I - but that AP somehow connects to the bridge, and are thus a port on it.
Fair. It's quite terse, so I figure it does exactly as it says, but where it is implemented makes it perhaps slightly confusing. |
but if i bridged two radios to a switch, and isolate both radio interfaces, then there is no isolation towards the bridge port. Only the one wireless interface to the other? |
Alright, I have done some reading and testing, the short answer is:
I can confirm that. The long answer/what I have foundIn OpenWRT the So Some more details can be found here As for the description I guess with this new info a short/simple description wouldn´t be up to the task. I suggest we use Sorry for the back and forth on this. |
This is good detective work. In this case, it's not a race, so we had time to get it right. I might suggest this:
I think that makes this part redundant: Here, it's a bit ambiguous what Maybe: |
Sounds good to me. |
`Isolate Bridge Port.' A wireless interface is not generally considered a port
Remove the word only.
Are you sure it prevents all client to client communication? No driver shortcuts? |
I agree, but as @systemcrash already said, it connects to the bridge as a port on it. The path for the kernel option (
Not as far as my testing showed (with hardware using the mt76 driver). Also in the case there were driver shortcuts (and the
On that specific interface: yes.
Can you clarify that question? If you mean we have two APs "A" and "B" both with bridge "br-guest" consisting of [phy0-ap0, phy1-ap0, lan1] with A wireless client of AP "A" could communicate with clients on AP "B" but not with other clients on AP "A". To isolate the clients in that scenario we would need the switch to have the same kind of port isolation feature or add nftables bridge rules that deny unwanted traffic. |
What would you like to see in luci?
With this commit we got the
bridge_isolate
option which flags the wireless interface as isolated when connected to a bridge. This is useful to isolate the clients on multiple interfaces/frequencies on the same device, but at the moment only possible by adding the option in/etc/config/wireless
manually.I would like to see the
bridge_isolate
option right next to theisolate
(Isolate Clients) option in the "Advanced Settings" tab of the wireless interface configuration. Perhaps "Isolate on Bridge" would be a fitting name?The text was updated successfully, but these errors were encountered: