Skip to content
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

netifd dont include dynamic vlans from hostapd #26

Open
LaneaLucy opened this issue Apr 20, 2024 · 1 comment
Open

netifd dont include dynamic vlans from hostapd #26

LaneaLucy opened this issue Apr 20, 2024 · 1 comment

Comments

@LaneaLucy
Copy link

i have the problem, that the luci wireless page dont show any stations connected to dynamic vlans on wpa2 enterprise or wpa2 personal ppsk. i traced it back to the luci code getting a empty vlan list and therefore dont even look at the vlans. the empty vlan list i traced back again first to ubus, which showed empty vlan list (ubus -v call network.wireless status), and this back to netifd, which dont consider the dynamicaly created vlans from hostapd and therefore the ubus vlan list is empty and therefore luci dont check for any stations on dynamic vlan networks.

here is the output of ubus -v call network.wireless status:

	"radio0": {
		"up": true,
		"pending": false,
		"autostart": true,
		"disabled": false,
		"retry_setup_failed": false,
		"config": {
			"path": "platform/soc/a000000.wifi",
			"channel": "1",
			"band": "2g",
			"htmode": "HT20",
			"cell_density": 0,
			"country": "DE"
		},
		"interfaces": [
			{
				"section": "wifinet3",
				"ifname": "phy0-ap0",
				"config": {
					"mode": "ap",
					"ssid": "HSZ",
					"encryption": "wpa2+ccmp",
					"auth_server": [
						"127.0.0.1"
					],
					"auth_secret": "testing123",
					"dynamic_vlan": 1,
					"auth_port": 1812,
					"vlan_file": "/etc/config/phy0-ap1.hostapd.vlan",
					"vlan_bridge": "br-vlan",
					"eap_reauth_period": 0,
					"mode": "ap",
					"network": [
						"lan"
					]
				},
				"vlans": [
					
				],
				"stations": [
					
				]
			},
			{
				"section": "wifinet4",
				"ifname": "phy0-ap1",
				"config": {
					"mode": "ap",
					"ssid": "HSZLegacy",
					"encryption": "psk2+ccmp",
					"key": "blablabla",
					"wpa_psk_file": "/etc/config/wpa_psk_file",
					"vlan_bridge": "br-vlan",
					"vlan_file": "/etc/config/phy0-ap0.hostapd.vlan",
					"dynamic_vlan": 1,
					"mode": "ap",
					"network": [
						"lan"
					]
				},
				"vlans": [
					
				],
				"stations": [
					
				]
			}
		]
	},
	"radio1": {
		"up": true,
		"pending": false,
		"autostart": true,
		"disabled": false,
		"retry_setup_failed": false,
		"config": {
			"path": "platform/soc/a800000.wifi",
			"channel": "36",
			"band": "5g",
			"htmode": "VHT80",
			"cell_density": 0,
			"country": "DE"
		},
		"interfaces": [
			{
				"section": "default_radio1",
				"ifname": "phy1-ap0",
				"config": {
					"mode": "ap",
					"ssid": "FRITZ!Box 7530 GL",
					"encryption": "psk2",
					"key": "blablabla",
					"ieee80211r": true,
					"ft_over_ds": false,
					"ft_psk_generate_local": true,
					"maclist": [
						"96:46:27:6E:70:1F"
					],
					"network": [
						"unten"
					],
					"mode": "ap"
				},
				"vlans": [
					
				],
				"stations": [
					
				]
			},
			{
				"section": "wifinet2",
				"ifname": "phy1-ap1",
				"config": {
					"mode": "ap",
					"ssid": "HSZ",
					"encryption": "wpa2+ccmp",
					"auth_server": [
						"127.0.0.1"
					],
					"auth_port": 1812,
					"auth_secret": "testing123",
					"dynamic_vlan": 1,
					"vlan_bridge": "br-vlan",
					"vlan_file": "/etc/config/phy1-ap1.hostapd.vlan",
					"eap_reauth_period": 0,
					"mode": "ap",
					"network": [
						"lan"
					]
				},
				"vlans": [
					
				],
				"stations": [
					
				]
			}
		]
	}
}

the output of iwinfo:

phy0-ap0  ESSID: "HSZ"
          Access Point: DC:15:C8:3C:F8:06
          Mode: Master  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 20 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: WPA2 802.1X (CCMP)
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap0.10 ESSID: unknown
          Access Point: DE:15:C8:3C:F8:06
          Mode: Master (VLAN)  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 0 dBm  Link Quality: 45/70
          Signal: -65 dBm  Noise: -98 dBm
          Bit Rate: 144.4 MBit/s
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap0.5 ESSID: unknown
          Access Point: DE:15:C8:3C:F8:06
          Mode: Master (VLAN)  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap0.69 ESSID: unknown
          Access Point: DE:15:C8:3C:F8:06
          Mode: Master (VLAN)  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap0.72 ESSID: unknown
          Access Point: DE:15:C8:3C:F8:06
          Mode: Master (VLAN)  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap0.80 ESSID: unknown
          Access Point: DE:15:C8:3C:F8:06
          Mode: Master (VLAN)  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap1  ESSID: "HSZLegacy"
          Access Point: DE:15:C8:3C:F8:06
          Mode: Master  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 20 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap1.10 ESSID: unknown
          Access Point: DC:15:C8:3C:F8:06
          Mode: Master (VLAN)  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap1.5 ESSID: unknown
          Access Point: DC:15:C8:3C:F8:06
          Mode: Master (VLAN)  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap1.69 ESSID: unknown
          Access Point: DC:15:C8:3C:F8:06
          Mode: Master (VLAN)  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap1.72 ESSID: unknown
          Access Point: DC:15:C8:3C:F8:06
          Mode: Master (VLAN)  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy0-ap1.80 ESSID: unknown
          Access Point: DC:15:C8:3C:F8:06
          Mode: Master (VLAN)  Channel: 1 (2.412 GHz)  HT Mode: HT20
          Center Channel 1: 1 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -98 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11b/g/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

phy1-ap0  ESSID: "FRITZ!Box 7530 GL"
          Access Point: DC:15:C8:3C:F8:07
          Mode: Master  Channel: 36 (5.180 GHz)  HT Mode: VHT80
          Center Channel 1: 42 2: unknown
          Tx-Power: 23 dBm  Link Quality: 10/70
          Signal: -100 dBm  Noise: -110 dBm
          Bit Rate: 237.8 MBit/s
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11ac/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

phy1-ap1  ESSID: "HSZ"
          Access Point: DE:15:C8:3C:F8:07
          Mode: Master  Channel: 36 (5.180 GHz)  HT Mode: VHT80
          Center Channel 1: 42 2: unknown
          Tx-Power: 23 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -110 dBm
          Bit Rate: unknown
          Encryption: WPA2 802.1X (CCMP)
          Type: nl80211  HW Mode(s): 802.11ac/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

phy1-ap1.10 ESSID: unknown
          Access Point: DE:15:C8:3C:F8:07
          Mode: Master (VLAN)  Channel: 36 (5.180 GHz)  HT Mode: VHT80
          Center Channel 1: 42 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -110 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11ac/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

phy1-ap1.5 ESSID: unknown
          Access Point: DE:15:C8:3C:F8:07
          Mode: Master (VLAN)  Channel: 36 (5.180 GHz)  HT Mode: VHT80
          Center Channel 1: 42 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -110 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11ac/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

phy1-ap1.69 ESSID: unknown
          Access Point: DE:15:C8:3C:F8:07
          Mode: Master (VLAN)  Channel: 36 (5.180 GHz)  HT Mode: VHT80
          Center Channel 1: 42 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -110 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11ac/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

phy1-ap1.72 ESSID: unknown
          Access Point: DE:15:C8:3C:F8:07
          Mode: Master (VLAN)  Channel: 36 (5.180 GHz)  HT Mode: VHT80
          Center Channel 1: 42 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -110 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11ac/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

phy1-ap1.80 ESSID: unknown
          Access Point: DE:15:C8:3C:F8:07
          Mode: Master (VLAN)  Channel: 36 (5.180 GHz)  HT Mode: VHT80
          Center Channel 1: 42 2: unknown
          Tx-Power: 0 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -110 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11ac/n
          Hardware: embedded [Qualcomm Atheros IPQ4019]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy1

as you can see, the vlan interfaces are there, they are just not part of the vlan list and therefore not picked up by luci

thx

@LaneaLucy LaneaLucy changed the title dont include dynamic vlans from hostapd netifd dont include dynamic vlans from hostapd Apr 20, 2024
@knarrff
Copy link

knarrff commented Aug 29, 2024

Same issue here. If I am not mistaken, in

netifd/config.c

Line 159 in 68c8a4f

static void
netifd collects interface information, but here it only considers the uci config files and this configuration will not include enough information to infer all the correct interface names, nor should it try to.

The second place netifd seems to look for information is in

netifd/config.c

Line 675 in 68c8a4f

config_procd_wireless_interface_cb(struct blob_attr *data)
. Here I am less sure. To me, it looks like it looks through what you should also get using ubus -v call service get_data for entries called wifi-iface. However, even with just a regular configuration, I do not see entries like that here. I may be completely wrong here, or it might be for a type of configuration I simply do not have. I don't know.

In essence, to me it looks like ifnetd only looks at configuration files while looking for wireless devices, and not at actual existing devices and it does not support all possible configuration options (again, I think it really shouldn't). Instead, it likely should get the list of devices from something like ubus call iwinfo devices. Question to the devs: would that work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants