What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

AdGuardHome AGH not working on new firmware 3006

I removed the guest network to get back to a functional environment for my family. Let me know if should add it back - not sure if this will have different results if so.

Code:
#!/bin/sh

[ -x /jffs/addons/AdGuardHome.d/AdGuardHome.sh ] && /jffs/addons/AdGuardHome.d/AdGuardHome.sh dnsmasq-sdn $2
 
I removed the guest network to get back to a functional environment for my family. Let me know if should add it back - not sure if this will have different results if so.

Code:
#!/bin/sh

[ -x /jffs/addons/AdGuardHome.d/AdGuardHome.sh ] && /jffs/addons/AdGuardHome.d/AdGuardHome.sh dnsmasq-sdn $2
That looks good. When you have a chance turn the guest network back on and tell me the values for nvram get lan3_ifname and nvram get br3_ifname. use the 3 if that is the SDN instance of guestnetwork, if not change the value to what ever dnsmasq uses for that sdn instance.
You can tell the instance number based on your logs:
Aug 9 08:22:55 custom_script: Running /jffs/scripts/dnsmasq-sdn.postconf (args: /etc/dnsmasq-3.conf 3)
In that instance it is your third configured network.
 
That looks good. When you have a chance turn the guest network back on and tell me the values for nvram get lan3_ifname and nvram get br3_ifname. use the 3 if that is the SDN instance of guestnetwork, if not change the value to what ever dnsmasq uses for that sdn instance.
You can tell the instance number based on your logs:

In that instance it is your third configured network.

Both commands return nothing. Confirmed that it’s still -3 in the logs.

The only command that returns is using “br1”, and it returns br54.

Code:
Aug  9 12:45:20 RT-BE96U-1CA0 custom_script: Running /jffs/scripts/dnsmasq-sdn.postconf (args: /etc/dnsmasq-3.conf 3)
Aug  9 12:45:20 RT-BE96U-1CA0 rc_service: waitting "restart_dnsfilter"(last_rc:restart_dnsfilter) via cfg_server ...
Aug  9 12:45:20 RT-BE96U-1CA0 dnsmasq[432197]: failed to create listening socket for 192.168.52.1: Address already in use
Aug  9 12:45:20 RT-BE96U-1CA0 dnsmasq[432197]: FAILED to start up

Also, dnsmasq-sdn.postconf contains the same as before. Could try to reinstall AGH and see if that changes.
 
Both commands return nothing. Confirmed that it’s still -3 in the logs.

The only command that returns is using “br1”, and it returns br54.

Code:
Aug  9 12:45:20 RT-BE96U-1CA0 custom_script: Running /jffs/scripts/dnsmasq-sdn.postconf (args: /etc/dnsmasq-3.conf 3)
Aug  9 12:45:20 RT-BE96U-1CA0 rc_service: waitting "restart_dnsfilter"(last_rc:restart_dnsfilter) via cfg_server ...
Aug  9 12:45:20 RT-BE96U-1CA0 dnsmasq[432197]: failed to create listening socket for 192.168.52.1: Address already in use
Aug  9 12:45:20 RT-BE96U-1CA0 dnsmasq[432197]: FAILED to start up

Also, dnsmasq-sdn.postconf contains the same as before. Could try to reinstall AGH and see if that changes.
okay
 
Can you run:
Code:
get_mtlan
nvram show | grep br54
The current logic isn’t valid for finding SDN interface names.

‘get_mtlan’
Code:
|-enable:[1]
|-prio:[0]
|-vid:[0]
|-port_isolation:[0]
|-name:[DEFAULT]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[0]
        |-ifname:[br0]
        |-br_ifname:[br0]
        |-addr:[192.168.50.1]
        |-subnet:[192.168.50.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.50.2]
        |-dhcp_max:[192.168.50.254]
        |-dhcp_lease:[86400]
        |-domain_name:[lan]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[1]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[]
        |-dhcp6_min:[]
        |-dhcp6_max:[]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[0]
        |-apg_idx:[0]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[0]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------
|-enable:[1]
|-prio:[0]
|-vid:[0]
|-port_isolation:[0]
|-name:[MAINBH]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[0]
        |-ifname:[br0]
        |-br_ifname:[br0]
        |-addr:[192.168.50.1]
        |-subnet:[192.168.50.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.50.2]
        |-dhcp_max:[192.168.50.254]
        |-dhcp_lease:[86400]
        |-domain_name:[lan]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[1]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[]
        |-dhcp6_min:[]
        |-dhcp6_max:[]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[1]
        |-apg_idx:[1]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[0]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------
|-enable:[1]
|-prio:[0]
|-vid:[0]
|-port_isolation:[0]
|-name:[MAINFH]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[0]
        |-ifname:[br0]
        |-br_ifname:[br0]
        |-addr:[192.168.50.1]
        |-subnet:[192.168.50.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.50.2]
        |-dhcp_max:[192.168.50.254]
        |-dhcp_lease:[86400]
        |-domain_name:[lan]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[1]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[]
        |-dhcp6_min:[]
        |-dhcp6_max:[]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[2]
        |-apg_idx:[2]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[0]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------
|-enable:[1]
|-prio:[0]
|-vid:[52]
|-port_isolation:[0]
|-name:[Guest]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[1]
        |-ifname:[br54]
        |-br_ifname:[br54]
        |-addr:[192.168.52.1]
        |-subnet:[192.168.52.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.52.2]
        |-dhcp_max:[192.168.52.254]
        |-dhcp_lease:[86400]
        |-domain_name:[]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[0]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[3]
        |-dhcp6_min:[1000]
        |-dhcp6_max:[2000]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[3]
        |-apg_idx:[1]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[11]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------

And ‘nvram show | grep br54’


Code:
apg_br54_fh_ethifnames=eth1.52 eth2.52 eth3.52 eth4.52 eth5.52
apg_br54_fh_wlifnames=wl0.52 wl1.52 wl2.52
apg_br_info=<52>br54>
apg_ifnames=br54
br1_ifname=br54
lan1_ifname=br54
subnet_rl_x=<1>br54>192.168.52.1>255.255.255.0>1>192.168.52.2>192.168.52.254>86400>>,>>0>>0>0>3>1000>2000>,,>0>1>
subnet_rl=<1>br54>192.168.52.1>255.255.255.0>1>192.168.52.2>192.168.52.254>86400>>,>>0>>0>0>3>1000>2000>,,>0>1>
size: 148573 bytes (113571 left)
 
‘get_mtlan’
Code:
|-enable:[1]
|-prio:[0]
|-vid:[0]
|-port_isolation:[0]
|-name:[DEFAULT]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[0]
        |-ifname:[br0]
        |-br_ifname:[br0]
        |-addr:[192.168.50.1]
        |-subnet:[192.168.50.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.50.2]
        |-dhcp_max:[192.168.50.254]
        |-dhcp_lease:[86400]
        |-domain_name:[lan]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[1]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[]
        |-dhcp6_min:[]
        |-dhcp6_max:[]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[0]
        |-apg_idx:[0]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[0]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------
|-enable:[1]
|-prio:[0]
|-vid:[0]
|-port_isolation:[0]
|-name:[MAINBH]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[0]
        |-ifname:[br0]
        |-br_ifname:[br0]
        |-addr:[192.168.50.1]
        |-subnet:[192.168.50.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.50.2]
        |-dhcp_max:[192.168.50.254]
        |-dhcp_lease:[86400]
        |-domain_name:[lan]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[1]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[]
        |-dhcp6_min:[]
        |-dhcp6_max:[]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[1]
        |-apg_idx:[1]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[0]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------
|-enable:[1]
|-prio:[0]
|-vid:[0]
|-port_isolation:[0]
|-name:[MAINFH]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[0]
        |-ifname:[br0]
        |-br_ifname:[br0]
        |-addr:[192.168.50.1]
        |-subnet:[192.168.50.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.50.2]
        |-dhcp_max:[192.168.50.254]
        |-dhcp_lease:[86400]
        |-domain_name:[lan]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[1]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[]
        |-dhcp6_min:[]
        |-dhcp6_max:[]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[2]
        |-apg_idx:[2]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[0]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------
|-enable:[1]
|-prio:[0]
|-vid:[52]
|-port_isolation:[0]
|-name:[Guest]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[1]
        |-ifname:[br54]
        |-br_ifname:[br54]
        |-addr:[192.168.52.1]
        |-subnet:[192.168.52.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.52.2]
        |-dhcp_max:[192.168.52.254]
        |-dhcp_lease:[86400]
        |-domain_name:[]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[0]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[3]
        |-dhcp6_min:[1000]
        |-dhcp6_max:[2000]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[3]
        |-apg_idx:[1]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[11]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------

And ‘nvram show | grep br54’


Code:
apg_br54_fh_ethifnames=eth1.52 eth2.52 eth3.52 eth4.52 eth5.52
apg_br54_fh_wlifnames=wl0.52 wl1.52 wl2.52
apg_br_info=<52>br54>
apg_ifnames=br54
br1_ifname=br54
lan1_ifname=br54
subnet_rl_x=<1>br54>192.168.52.1>255.255.255.0>1>192.168.52.2>192.168.52.254>86400>>,>>0>>0>0>3>1000>2000>,,>0>1>
subnet_rl=<1>br54>192.168.52.1>255.255.255.0>1>192.168.52.2>192.168.52.254>86400>>,>>0>>0>0>3>1000>2000>,,>0>1>
size: 148573 bytes (113571 left)
I have already pushed a fix.
 
Can you run:
Code:
get_mtlan
nvram show | grep br54
The current logic isn’t valid for finding SDN interface names.
‘get_mtlan’
Code:
|-enable:[1]
|-prio:[0]
|-vid:[0]
|-port_isolation:[0]
|-name:[DEFAULT]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[0]
        |-ifname:[br0]
        |-br_ifname:[br0]
        |-addr:[192.168.50.1]
        |-subnet:[192.168.50.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.50.2]
        |-dhcp_max:[192.168.50.254]
        |-dhcp_lease:[86400]
        |-domain_name:[lan]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[1]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[]
        |-dhcp6_min:[]
        |-dhcp6_max:[]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[0]
        |-apg_idx:[0]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[0]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------
|-enable:[1]
|-prio:[0]
|-vid:[0]
|-port_isolation:[0]
|-name:[MAINBH]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[0]
        |-ifname:[br0]
        |-br_ifname:[br0]
        |-addr:[192.168.50.1]
        |-subnet:[192.168.50.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.50.2]
        |-dhcp_max:[192.168.50.254]
        |-dhcp_lease:[86400]
        |-domain_name:[lan]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[1]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[]
        |-dhcp6_min:[]
        |-dhcp6_max:[]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[1]
        |-apg_idx:[1]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[0]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------
|-enable:[1]
|-prio:[0]
|-vid:[0]
|-port_isolation:[0]
|-name:[MAINFH]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[0]
        |-ifname:[br0]
        |-br_ifname:[br0]
        |-addr:[192.168.50.1]
        |-subnet:[192.168.50.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.50.2]
        |-dhcp_max:[192.168.50.254]
        |-dhcp_lease:[86400]
        |-domain_name:[lan]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[1]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[]
        |-dhcp6_min:[]
        |-dhcp6_max:[]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[2]
        |-apg_idx:[2]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[0]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------
|-enable:[1]
|-prio:[0]
|-vid:[52]
|-port_isolation:[0]
|-name:[Guest]
|-createby:[WEB]
|-*Network:
  |--IPv4:
        |-idx:[1]
        |-ifname:[br54]
        |-br_ifname:[br54]
        |-addr:[192.168.52.1]
        |-subnet:[192.168.52.0]
        |-netmask:[255.255.255.0]
        |-prefixlen:[24]
        |-dhcp_enable:[1]
        |-dhcp_min:[192.168.52.2]
        |-dhcp_max:[192.168.52.254]
        |-dhcp_lease:[86400]
        |-domain_name:[]
        |-dns:[][]
        |-wins:[]
        |-dhcp_res:[0]
        |-dhscp_res_idx:[0]
        |-dot_enable:[0]
        |-dot_tls:[1]
  |--IPv6:
        |-v6_enable:[0]
        |-v6_autoconf:[0]
        |-addr6:[3]
        |-dhcp6_min:[1000]
        |-dhcp6_max:[2000]
        |-dns6:[][][]
|-*SDN Feature Index/Switch:
        |-sdn_idx:[3]
        |-apg_idx:[1]
        |-vpnc_idx:[0]
        |-vpns_idx:[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
        |-dnsf_idx:[11]
        |-urlf_idx:[0]
        |-nwf_idx:[0]
        |-cp_idx:[0]
        |-gre_idx:[0][0][0][0][0][0][0][0]
        |-fw_idx:[0]
        |-killsw_sw:[0]
        |-ahs_sw:[0]
        |-wan_idx:[0]
        |-ppprelay_sw:[0]
        |-wan6_idx:[0]
        |-mtwan_idx:[0]
        |-mswan_idx:[0]
---------------------------------------

And ‘nvram show | grep br54’


Code:
apg_br54_fh_ethifnames=eth1.52 eth2.52 eth3.52 eth4.52 eth5.52
apg_br54_fh_wlifnames=wl0.52 wl1.52 wl2.52
apg_br_info=<52>br54>
apg_ifnames=br54
br1_ifname=br54
lan1_ifname=br54
subnet_rl_x=<1>br54>192.168.52.1>255.255.255.0>1>192.168.52.2>192.168.52.254>86400>>,>>0>>0>0>3>1000>2000>,,>0>1>
subnet_rl=<1>br54>192.168.52.1>255.255.255.0>1>192.168.52.2>192.168.52.254>86400>>,>>0>>0>0>3>1000>2000>,,>0>1>
size: 148573 bytes (113571 left)
It is down right dirty, and downright ugly but it does the job.
Code:
get_mtlan | awk -v idx="$2" '/^[[:space:]]*\|-enable:/ {br=""; sdn=""} /^[[:space:]]*\|-br_ifname:/ {s=index($0,"["); e=index($0,"]"); if(s>0&&e>s) br=substr($0,s+1,e-s-1)} /^[[:space:]]*\|-sdn_idx:/ {s=index($0,"["); e=index($0,"]"); if(s>0&&e>s) {sdn=substr($0,s+1,e-s-1); if(sdn==idx) {print br; exit}}}'
where idx is passed by the $2 variable from dnsmasq-sdn.postconf. this will give any instance's interface.

with alittle bit of editing: this will do it only if the instance is enabled.

Code:
get_mtlan | awk -v idx="$2" '/^[[:space:]]*\|-enable:/ {e=""; br=""; sdn=""} /^[[:space:]]*\|-enable:/ {s=index($0,"["); c=index($0,"]"); if(s&gt;0&amp;&amp;c&gt;s) e=substr($0,s+1,c-s-1)} /^[[:space:]]*\|-br_ifname:/ {s=index($0,"["); c=index($0,"]"); if(s&gt;0&amp;&amp;c&gt;s) br=substr($0,s+1,c-s-1)} /^[[:space:]]*\|-sdn_idx:/ {s=index($0,"["); c=index($0,"]"); if(s&gt;0&amp;&amp;c&gt;s) {sdn=substr($0,s+1,c-s-1); if(sdn==idx&amp;&amp;e=="1"){print br; exit}}}'
 
Last edited:
Substituting 3 in there for $2 returns br54. That does look to work.

EDIT;
Both commands return the same!
 
Last edited:
Substituting 3 in there for $2 returns br54. That does look to work.
So if you run update with the installer, I just did a minor patch that resolves this issue for you and every other user. Thank you for being so cooperative. All I hope is my toils and troubles, helps other developers here such as @thelonelycoder and any other developers on here who may be dealing with dnsmasq sdn-instances in the future.
 
Awesome, that is working - thank you so much @SomeWhereOverTheRainBow! Guest network is running, system log is clean, and I see the queries in AGH on the guest network.

Very much appreciated.
No problem. It is your feedback that makes the script better. I just chip away the rough edges. Keep it coming if you find anything else broken with the script.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top