RDKBWIFI-445: Fixed binary data comparison in webconfig#1144
RDKBWIFI-445: Fixed binary data comparison in webconfig#1144vlad-safonov wants to merge 2 commits into
Conversation
|
I have read the CLA Document and I hereby sign the CLA |
| typedef void (*ext_proto_update_assoc_sta_mld_info_t)(void *data_model, em_assoc_sta_mld_info_t *assoc_sta_mld_info); | ||
| typedef em_ap_mld_info_t * (*ext_proto_get_ap_mld_frm_bssid_t)(void *data_model, mac_address_t bss_id); | ||
| typedef em_radio_cap_info_t * (*ext_proto_get_radio_cap_t)(void *data_model, int index); | ||
| typedef em_radio_cap_info_t * (*ext_proto_get_radio_cap_t)(void *data_model, unsigned int index); |
There was a problem hiding this comment.
Hi @Nikita-Hakai , I would like to discuss this line - if we do it - it also requires some adjustments in unified-wifi-mesh, something like
diff --git a/inc/dm_easy_mesh.h b/inc/dm_easy_mesh.h
index bac8a20..aa2c217 100644
--- a/inc/dm_easy_mesh.h
+++ b/inc/dm_easy_mesh.h
@@ -1738,8 +1738,8 @@ public:
void update_assoc_sta_mld_info(em_assoc_sta_mld_info_t *assoc_sta_mld_info);
static void update_assoc_sta_mld_info(void *dm, em_assoc_sta_mld_info_t *assoc_sta_mld_info) { (static_cast<dm_easy_mesh_t *>(dm))->update_assoc_sta
_mld_info(assoc_sta_mld_info); }
- em_radio_cap_info_t *get_radio_cap_info(int index);
- static em_radio_cap_info_t *get_radio_cap_info(void *dm, int index) { return (static_cast<dm_easy_mesh_t *>(dm))->get_radio_cap_info(index); }
+ em_radio_cap_info_t *get_radio_cap_info(unsigned int index);
+ static em_radio_cap_info_t *get_radio_cap_info(void *dm, unsigned int index) { return (static_cast<dm_easy_mesh_t *>(dm))->get_radio_cap_info(index)
; }
/**!
* @brief Retrieves the Data Model DPP object.
and remove some castings which will make code cleaner, so do you want to have this fix here and merge it together with unified-wifi-mesh?
There was a problem hiding this comment.
hi @vlad-safonov, sorry caught to this notification little late. I see that corresponding unified-wifi-mesh changes are raised, will have to merge it together. Can you kindly confirm, if the changes are good in the sense not breaking working functionality?
There was a problem hiding this comment.
@Nikita-Hakai yes from my point of view it is safe, we performed tests and there are no regressions
There was a problem hiding this comment.
Pull request overview
This PR fixes incorrect BSSID matching in the webconfig AP metrics report path by replacing strncmp() (string semantics) with memcmp() (binary semantics) when comparing BSSID values, ensuring per-VAP metrics are attributed to the correct VAP.
Changes:
- Replace
strncmp()withmemcmp()for BSSID comparisons in AP metrics encoding. - Replace
strncmp()withmemcmp()for BSSID comparisons while translating AP metrics to EasyMesh BSS info. - Update the external EasyMesh proto function-pointer typedef
ext_proto_get_radio_cap_tto take anunsigned intindex.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| source/webconfig/wifi_encoder.c | Fixes binary BSSID comparison when mapping VAPs to AP metrics during encoding. |
| source/webconfig/wifi_easymesh_translator.c | Fixes binary BSSID comparison when locating the matching VAP report during translation. |
| include/webconfig_external_proto_easymesh.h | Adjusts get_radio_cap callback signature to use an unsigned index. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e49b85a to
dd1e99e
Compare
Reason for change: AP metric report shows statistic for all VAP's from first VAP including the STA report
After investigation we found binary data comparing using strncmp, mac is starting with
0, treaded as comparison of two 0-length strings and always returning trueTest procedure: AP metric report should statistic for correct VAP
After STA connection statistic should be available only on one VAP
(without the patch it will be shown on all VAP's)
bez patcha STA pokazivajetsja na vseh vapah
Priority: Critical
Risk: Low