Effective workarounds for bridged VAPs not working at boot

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4  Next
Author Message
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Tue Nov 30, 2021 16:11    Post subject: Reply with quote
Speaking of, you know better than most of us what the verdict is for fixing this bug. Last I knew, it was "wontfix"... but anyway, people have to open new tickets.

https://svn.dd-wrt.com/ticket/7493

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Sponsor
jwh7
DD-WRT Guru


Joined: 25 Oct 2013
Posts: 2670
Location: Indy

PostPosted: Tue Nov 30, 2021 19:37    Post subject: Reply with quote
kernel-panic69 wrote:
Speaking of, you know better than most of us what the verdict is for fixing this bug. Last I knew, it was "wontfix"... but anyway, people have to open new tickets.

https://svn.dd-wrt.com/ticket/7493
Oh yes, indeed... Wink And that new ticket was how I went down this rabbit hole (again). Razz
_________________
# NAT/SFE/CTF: limited speed w/ DD # Repeater issues # DD-WRT info: FAQ, Builds, Types, Modes, Changes, Demo #
OPNsense x64 5050e ITX|DD: DIR-810L, 2*EA6900@1GHz, R6300v1, RT-N66U@663, WNDR4000@533, E1500@353,
WRT54G{Lv1.1,Sv6}@250
|FreshTomato: F7D8302@532|OpenWRT: F9K1119v1, RT-ACRH13, R6220, WNDR3700v4
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Sun Dec 05, 2021 14:29    Post subject: Reply with quote
An interesting development related to VAP's https://svn.dd-wrt.com/changeset/47761
_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
Lanchon
DD-WRT Novice


Joined: 05 Oct 2019
Posts: 22

PostPosted: Sun Dec 05, 2021 14:50    Post subject: Reply with quote
kernel-panic69 wrote:
Speaking of, you know better than most of us what the verdict is for fixing this bug. Last I knew, it was "wontfix"... but anyway, people have to open new tickets.

https://svn.dd-wrt.com/ticket/7493


but people this time around found the issue and fixed it Smile
Lanchon
DD-WRT Novice


Joined: 05 Oct 2019
Posts: 22

PostPosted: Sun Dec 05, 2021 15:01    Post subject: Reply with quote
the-joker wrote:
An interesting development related to VAP's https://svn.dd-wrt.com/changeset/47761


but BS missed a 3rd change needed in that function.

unfortunately that is a dirty proof-of-concept fix i did editing the binaries, but it is not fully correct.

also the same issue is present all over the codebase, at least in these places (but could be others), and all need fixing:
Code:
rod@rod-latitude:~/dd-wrt/dd-wrt/src/router$ grep -sR '"wlan", 4'
hostapd-wps/src/drivers/driver_hostap.c:   if (os_strncmp(ifname, "wlan", 4) == 0) {
hostapd-wps/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
libutils/libutils/bridgetools.c:   if (strncmp(dev, "wlan", 4) != 0) {   // this is not an ethernet driver
libutils/libutils/bridgetools.c:   if (strncmp(dev, "wlan", 4) != 0) {   // this is not an ethernet driver
libutils/libutils/bridgetools.c:   if (!strncmp(dev, "wlan", 4) && (sep = strstr(mainif, ".sta"))) {
libutils/libutils/libbridge_if.c:   if (strncmp(dev, "wlan", 4) != 0) {   // this is not an ethernet driver
libutils/libutils/libbridge_if.c:   if (strncmp(dev, "wlan", 4) != 0) {   // this is not an ethernet driver
libutils/libwireless/wl.c:   if (strncmp(ifname, "wlan", 4))
libutils/libwireless/wl.c:   if (strncmp(prefix, "wlan", 4))
services/services/bonding.c:      if (!strncmp(port, "wlan", 4)
services/networking/generic/network.c:         if (strncmp(name, "wlan", 4) && strncmp(name, "ra", 2))
services/networking/generic/network.c:         if (strncmp(realname, "wlan", 4) != 0) {   // this is not an ethernet driver
services/networking/generic/network.c:         if (strncmp(realname, "wlan", 4) != 0) {   // this is not an ethernet driver
services/networking/generic/network.c:   if (strncmp(interface, "wlan", 4))
hostapd-20120910/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
hostapd-2014-04-24/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
httpd/visuals/dd-wrt.c:   if (!strncmp(var, "wlan", 4) && strstr(var, ".sta"))
httpd/visuals/portsetup.c:         if (!strncmp(var, "wlan", 4) && strstr(var, ".sta"))
hostapd-2017-08-24/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
hostapd-2014-10-25/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
hostapd-2014-06-03/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
hostapd-2018-07-08/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
hostapd2/src/drivers/driver_hostap.c:   if (os_strncmp(ifname, "wlan", 4) == 0) {
hostapd2/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
tcpdump/tcpdump.c:          strncmp(device, "wlan", 4) == 0) {
hostapd-2016-06-15/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
aircrack-ng/lib/osdep/linux.c:   if (strlen(iface) == 5 && memcmp(iface, "wlan", 4) == 0)
hostapd-2016-09-05/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Sun Dec 05, 2021 19:48    Post subject: Reply with quote
Not sure if anyone else did or not, but I just passed on your commentary for the ticket and this thread. We hope that this will finally put things to rest and the issues will no longer be issues. Thank you for taking two years to have this epiphany, just in time for Christmas.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Sun Dec 05, 2021 22:29    Post subject: Reply with quote
Lanchon wrote:
but BS missed a 3rd change needed in that function.


I understand that submitting patches upstream is complicated using SVN, its retarded SVN hasn't evolved in this department, However Git patches/PR's are compatible with SVN, if you make such a patch would be easier to submit for review.

Enjoy and thanks for the effort.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
Lanchon
DD-WRT Novice


Joined: 05 Oct 2019
Posts: 22

PostPosted: Mon Dec 06, 2021 3:16    Post subject: Reply with quote
the-joker wrote:
Lanchon wrote:
but BS missed a 3rd change needed in that function.


I understand that submitting patches upstream is complicated using SVN, its retarded SVN hasn't evolved in this department, However Git patches/PR's are compatible with SVN, if you make such a patch would be easier to submit for review.

Enjoy and thanks for the effort.


thanks for the info, much appreciated.

i could sort out some stuff, but i feel there is little engagement here. i ask stuff about the codebase and nobody replies. yes, the answer is in the code, but requires time to dig, and people familiar with it would save a lot of time by giving an effortless answer. but they dont. it is a bit discouraging. Sad
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7463
Location: Dresden, Germany

PostPosted: Mon Dec 06, 2021 7:34    Post subject: Reply with quote
Lanchon wrote:
the-joker wrote:
An interesting development related to VAP's https://svn.dd-wrt.com/changeset/47761


but BS missed a 3rd change needed in that function.

unfortunately that is a dirty proof-of-concept fix i did editing the binaries, but it is not fully correct.

also the same issue is present all over the codebase, at least in these places (but could be others), and all need fixing:
Code:
rod@rod-latitude:~/dd-wrt/dd-wrt/src/router$ grep -sR '"wlan", 4'
hostapd-wps/src/drivers/driver_hostap.c:   if (os_strncmp(ifname, "wlan", 4) == 0) {
hostapd-wps/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
libutils/libutils/bridgetools.c:   if (strncmp(dev, "wlan", 4) != 0) {   // this is not an ethernet driver
libutils/libutils/bridgetools.c:   if (strncmp(dev, "wlan", 4) != 0) {   // this is not an ethernet driver
libutils/libutils/bridgetools.c:   if (!strncmp(dev, "wlan", 4) && (sep = strstr(mainif, ".sta"))) {
libutils/libutils/libbridge_if.c:   if (strncmp(dev, "wlan", 4) != 0) {   // this is not an ethernet driver
libutils/libutils/libbridge_if.c:   if (strncmp(dev, "wlan", 4) != 0) {   // this is not an ethernet driver
libutils/libwireless/wl.c:   if (strncmp(ifname, "wlan", 4))
libutils/libwireless/wl.c:   if (strncmp(prefix, "wlan", 4))
services/services/bonding.c:      if (!strncmp(port, "wlan", 4)
services/networking/generic/network.c:         if (strncmp(name, "wlan", 4) && strncmp(name, "ra", 2))
services/networking/generic/network.c:         if (strncmp(realname, "wlan", 4) != 0) {   // this is not an ethernet driver
services/networking/generic/network.c:         if (strncmp(realname, "wlan", 4) != 0) {   // this is not an ethernet driver
services/networking/generic/network.c:   if (strncmp(interface, "wlan", 4))
hostapd-20120910/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
hostapd-2014-04-24/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
httpd/visuals/dd-wrt.c:   if (!strncmp(var, "wlan", 4) && strstr(var, ".sta"))
httpd/visuals/portsetup.c:         if (!strncmp(var, "wlan", 4) && strstr(var, ".sta"))
hostapd-2017-08-24/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
hostapd-2014-10-25/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
hostapd-2014-06-03/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
hostapd-2018-07-08/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
hostapd2/src/drivers/driver_hostap.c:   if (os_strncmp(ifname, "wlan", 4) == 0) {
hostapd2/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
tcpdump/tcpdump.c:          strncmp(device, "wlan", 4) == 0) {
hostapd-2016-06-15/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {
aircrack-ng/lib/osdep/linux.c:   if (strlen(iface) == 5 && memcmp(iface, "wlan", 4) == 0)
hostapd-2016-09-05/src/drivers/driver_wext.c:   if (os_strncmp(drv->ifname, "wlan", 4) == 0) {


you have no idea what you are posting here. you simply post a "grep" output without taking care that alot of these codepieces are not even used in broadcom builds. you have to check what these single lines are doing and if they affect the issue before flooding the forum with such totally unrelated postings

_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Mon Dec 06, 2021 13:37    Post subject: Reply with quote
The only thing I could see that might get broken here as a result of fixing Broadcom is all other platforms because of shared code. There may be a need to add defines to employ the proper fix to Broadcom and use the previous code for all others. (I am going to copy and paste this to a reply to BrainSlayer's email, too).

So, testing VAPs on other platforms may be required to justify or negate my statement ... Twisted Evil

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Dec 08, 2021 13:24    Post subject: Reply with quote
Just tested 47810 I did not do a reset on this router and it is heavily used for testing but I simply made an unbridged VAP the modern way (so without br1 and using DHCPd to setup DNSMasq).

After a reboot it started to work, it did take a number of seconds, at first I had the "could not connect" messages but after a few seconds it connected Yeah Smile

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2927
Location: Germany

PostPosted: Wed Dec 08, 2021 13:29    Post subject: Reply with quote
egc wrote:
After a reboot it started to work


This is also the case on the Atheros routers.
After adding a new DHCP server you have to restart the router otherwise the clients of the VAP can't get an IP address somehow.

I assume that something is not started via the "apply" button.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14126
Location: Texas, USA

PostPosted: Wed Dec 08, 2021 16:07    Post subject: Reply with quote
I think we can lay most of these threads to rest finally (after the next public beta). Not sure anyone would be wanting to use unsecured guest wi-fi, and if they did, I don't think they would be mucking around with clicking "apply settings"(?):

https://svn.dd-wrt.com/ticket/7493#comment:31

Quote:
tests of r47810 std on Netgear AC1450

TL;DR: it works!
  • 2.4 and 5 GHz, with 2 VAPs on each band (4 VAPs, 6 APs total)
  • MACs are all ok (but the 2.4 GHz band will support only 14 VIFs -not 16- before clashing with ethernet MACs)
  • all 6 IFs running WPA2+AES
  • works fine on boot
  • works fine after Wireless / Main "apply settings"
  • works fine with bridged and unbridged VAPs
  • works fine with different passwords (keys) per VAP


detected issue

all VAPs must use the same auth scheme. if a VAP security is disabled (open network), all works fine after boot. however, as soon as Wireless / Main "apply settings" is clicked, the open VAP vanishes: it is no longer shown on clients. at this stage stopservice wlconf; startservice wlconf restores functionality. (and we are back again with the same workaround, aghhh!)


EDIT: The unsecured vap issue is still an issue to be fixed at some point, per BrainSlayer. But outside of that, all is well in the world of Broadcom VAPs again for the most part Cool

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Dec 08, 2021 16:44    Post subject: Reply with quote
kernel-panic69 wrote:
I think we can lay most of these threads to rest finally (after the next public beta). Not sure anyone would be wanting to use unsecured guest wi-fi, and if they did, I don't think they would be mucking around with clicking "apply settings"(?):

https://svn.dd-wrt.com/ticket/7493#comment:31

Quote:
tests of r47810 std on Netgear AC1450

TL;DR: it works!
  • 2.4 and 5 GHz, with 2 VAPs on each band (4 VAPs, 6 APs total)
  • MACs are all ok (but the 2.4 GHz band will support only 14 VIFs -not 16- before clashing with ethernet MACs)
  • all 6 IFs running WPA2+AES
  • works fine on boot
  • works fine after Wireless / Main "apply settings"
  • works fine with bridged and unbridged VAPs
  • works fine with different passwords (keys) per VAP


detected issue

all VAPs must use the same auth scheme. if a VAP security is disabled (open network), all works fine after boot. however, as soon as Wireless / Main "apply settings" is clicked, the open VAP vanishes: it is no longer shown on clients. at this stage stopservice wlconf; startservice wlconf restores functionality. (and we are back again with the same workaround, aghhh!)


EDIT: The unsecured vap issue is still an issue to be fixed at some point, per BrainSlayer. But outside of that, all is well in the world of Broadcom VAPs again for the most part Cool


Actually I noticed that when the VAP is setup it already had Security in place which I really liked, normally it is open and you have to set security, I like this better.

I checked you can change the password to something else Smile

So I am good Smile

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Wed Dec 08, 2021 19:54    Post subject: Reply with quote
ho1Aetoo wrote:
egc wrote:
After a reboot it started to work


This is also the case on the Atheros routers.
After adding a new DHCP server you have to restart the router otherwise the clients of the VAP can't get an IP address somehow.

I assume that something is not started via the "apply" button.


Its a question of restarting the right services depending whats changed.

The most least technical way I know is to send interfaces down/ reconfigure them and send them up.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
Goto page Previous  1, 2, 3, 4  Next Display posts from previous:    Page 3 of 4
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum