Removing VAPs showing "BAD GATEWAY"

Hi,

I have created 16 VAPs on 5 GHz and 16 VAPs on 2.4GHz. So the total VAPs are 32.
Now I have removed one VAP from any radio. After some time it is showing bad gateway.

Please find the attached file.

Thanks in Advance.

specify "after some time" more precisely.
can you reproduce it?

Hi @psyborg,

Thank for your reply.

It means when I click on the remove button then one popup shows for the confirmation after clicking on the confirmation button, the page is going to reload and after almost 1 min it shows BAD GATEWAY.

which device is that? does it reboot automatically after that?

Linux 3.14.77 #5 SMP PREEMPT Tue Nov 01 10:37:06 IST 2017 armv7l GNU/Linux

No, It won't get reboot after that.

check that you don't run out of free RAM after enabling all these virtual APs

Are you Sure you are using OpenWRT?

2 Likes

Hi @juppin,

Yes.

spf-5-0-2

It looks like an OEM kernel...

1 Like

Hi @psyborg

I don't run out of free RAM after enabling all the VAPs.

Hi @psyborg

I have tried again to reproduce this issue and again I have faced this.
I have enabled all 32 VAPs in both 2.4 GHz and 5 GHz radio(16-16 each) and try to remove one VAP from 5 GHz radio. After exactly 1 min I am getting a bad gateway.
Please find the attached file.

Even I have changed the network script time out from 60 sec to 500 sec.

config uhttpd 'main'
        list listen_http '0.0.0.0:80'
        list listen_http '[::]:80'
        list listen_https '0.0.0.0:443'
        list listen_https '[::]:443'
        option redirect_https '1'
        option home '/www'
        option rfc1918_filter '1'
        option max_requests '3'
        option max_connections '100'
        option cert '/etc/uhttpd.crt'
        option key '/etc/uhttpd.key'
        option cgi_prefix '/cgi-bin'
        option script_timeout '60'
        option network_timeout '500'
        option http_keepalive '20'
        option tcp_keepalive '1'
        option ubus_prefix '/ubus'

config cert 'px5g'
        option days '730'
        option bits '1024'
        option country 'ZZ'
        option state 'Somewhere'
        option location 'Uknown'
        option commonname 'OpenWrt'

i could not find that device. what hardware specs it has? i am facing similar issue on one of my devices, but i was sure it is due to hardware mods and overclock (destroyed flash chips pads so i had to pull wires to a tiny board and solder it there)

Hi @psyborg,

Earlier when i delete the VAP then only it was not showing on GUI but it is scanable on devices. while after doing wifi up then it is not scanable on device so i have added one wifi up command in one function in file controller/admin/network.lua

function wifi_delete(network)
    local ntm = require "luci.model.network".init()
    local wnet = ntm:get_wifinet(network)
    if wnet then
        local dev = wnet:get_device()
        local nets = wnet:get_networks()
        if dev then
            ntm:del_wifinet(network)
            ntm:commit("wireless")
            local _, net
            for _, net in ipairs(nets) do
                if net:is_empty() then
                    ntm:del_network(net:name())
                    ntm:commit("network")
                end
            end
        --  luci.sys.call("env -i /bin/ubus call network reload >/dev/null 2>/dev/null")
            luci.sys.call(" wifi up > /dev/null 2>&1")
        end
    end

    luci.http.redirect(luci.dispatcher.build_url("admin/network/wireless"))
end

no idea if that is proper way to do wifi restart. maybe ask @jow

Hi @jow,

Can you please help me with this?

Thanks in advance.

I can't really help here, sorry. If a network reload is not enough to bring the new wifi configs up, it hints at a bug in the wireless driver <> netifd integration. Do you use a proprietary SDK or proprietary wifi driver by any chance?