mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 11:22:50 +00:00
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
Signed-off-by: John Crispin <john@phrozen.org>
55 lines
1.9 KiB
Diff
55 lines
1.9 KiB
Diff
From 183fe898dff0acf05ff48e66d9bfb738a33b5c4b Mon Sep 17 00:00:00 2001
|
|
From: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|
Date: Thu, 26 Oct 2023 10:03:38 +0530
|
|
Subject: [PATCH] hostapd: fix own address assignment during setup of first
|
|
link BSS
|
|
|
|
Currently during setting of first link of BSS in MLD, own address was set
|
|
as a random BSSID derived from the actual interface address even if the
|
|
BSSID config was passed. This is wrong and it should instead use the
|
|
config value if provided. If not then it can use a random value.
|
|
|
|
Add changes to check and assign a random value only if config is not
|
|
passed. If config is passed, use the same value.
|
|
|
|
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
|
---
|
|
hostapd/main.c | 9 +++++++--
|
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
|
--- a/hostapd/main.c
|
|
+++ b/hostapd/main.c
|
|
@@ -209,7 +209,7 @@ static int hostapd_driver_init(struct ho
|
|
hapd->setup_complete_cb = hostapd_setup_complete_cb;
|
|
|
|
/* Initialize the driver interface */
|
|
- if (!(b[0] | b[1] | b[2] | b[3] | b[4] | b[5]))
|
|
+ if (is_zero_ether_addr(b))
|
|
b = NULL;
|
|
|
|
os_memset(¶ms, 0, sizeof(params));
|
|
@@ -268,7 +268,12 @@ static int hostapd_driver_init(struct ho
|
|
*/
|
|
if (hapd->conf->mld_ap) {
|
|
os_memcpy(hapd->mld->mld_addr, hapd->own_addr, ETH_ALEN);
|
|
- random_mac_addr_keep_oui(hapd->own_addr);
|
|
+
|
|
+ if (!b)
|
|
+ random_mac_addr_keep_oui(hapd->own_addr);
|
|
+ else
|
|
+ os_memcpy(hapd->own_addr, b, ETH_ALEN);
|
|
+
|
|
hapd->mld_link_id = hapd->mld->next_link_id++;
|
|
hostapd_mld_add_link(hapd);
|
|
wpa_printf(MSG_DEBUG, "Setup of first link (link %d) BSS of MLD %s",
|
|
--- a/src/ap/hostapd.c
|
|
+++ b/src/ap/hostapd.c
|
|
@@ -1389,7 +1389,6 @@ static int hostapd_setup_bss(struct host
|
|
wpa_printf(MSG_DEBUG, "TSetup of first link BSS of MLD %s",
|
|
hapd->conf->iface);
|
|
os_memcpy(hapd->mld->mld_addr, hapd->own_addr, ETH_ALEN);
|
|
- random_mac_addr_keep_oui(hapd->own_addr);
|
|
hapd->mld_link_id = hapd->mld->next_link_id++;
|
|
hostapd_mld_add_link(hapd);
|
|
}
|