0002-wpa_supplicant-use-a-less-generic-name-for-IEEE802.1.patch 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. From c8af2e431b47d7d900e0c7359705aaa1096d302a Mon Sep 17 00:00:00 2001
  2. From: Sergey Matyukevich <geomatsi@gmail.com>
  3. Date: Fri, 16 Sep 2022 23:18:50 +0300
  4. Subject: [PATCH] wpa_supplicant: use a less generic name for IEEE802.11 CRC-32 routine
  5. Hostapd uses 'crc32' name for IEEE802.11 CRC-32 routine. This name is
  6. too generic. Buildroot autobuilder detected build configuration that
  7. failed to build due to the naming conflict: static linking with openssl
  8. using zlib-ng as a zlib provider, e.g. see:
  9. - http://autobuild.buildroot.net/results/9901df820d3afa4cde78e8ad6d62cb8ce7e69fdb/
  10. - http://autobuild.buildroot.net/results/ac19975f0bf77f4a8ca574c374092ba81cd5a332/
  11. Use a less generic name ieee80211_crc32 for IEEE802.11 CRC-32 routine
  12. to avoid such naming conflicts.
  13. Upstream: https://w1.fi/cgit/hostap/commit/?id=0c7b3814ca6070a8e930dea09fde08b4058a4ca6
  14. Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
  15. ---
  16. src/ap/hostapd.c | 3 ++-
  17. src/ap/neighbor_db.c | 2 +-
  18. src/utils/crc32.c | 2 +-
  19. src/utils/crc32.h | 2 +-
  20. 4 files changed, 5 insertions(+), 4 deletions(-)
  21. diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
  22. index 4b88641a2..56c8fb90e 100644
  23. --- a/src/ap/hostapd.c
  24. +++ b/src/ap/hostapd.c
  25. @@ -1230,7 +1230,8 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
  26. * Short SSID calculation is identical to FCS and it is defined in
  27. * IEEE P802.11-REVmd/D3.0, 9.4.2.170.3 (Calculating the Short-SSID).
  28. */
  29. - conf->ssid.short_ssid = crc32(conf->ssid.ssid, conf->ssid.ssid_len);
  30. + conf->ssid.short_ssid = ieee80211_crc32(conf->ssid.ssid,
  31. + conf->ssid.ssid_len);
  32. if (!hostapd_drv_none(hapd)) {
  33. wpa_printf(MSG_DEBUG, "Using interface %s with hwaddr " MACSTR
  34. diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
  35. index 229edd2a9..ef17634c3 100644
  36. --- a/src/ap/neighbor_db.c
  37. +++ b/src/ap/neighbor_db.c
  38. @@ -136,7 +136,7 @@ int hostapd_neighbor_set(struct hostapd_data *hapd, const u8 *bssid,
  39. os_memcpy(entry->bssid, bssid, ETH_ALEN);
  40. os_memcpy(&entry->ssid, ssid, sizeof(entry->ssid));
  41. - entry->short_ssid = crc32(ssid->ssid, ssid->ssid_len);
  42. + entry->short_ssid = ieee80211_crc32(ssid->ssid, ssid->ssid_len);
  43. entry->nr = wpabuf_dup(nr);
  44. if (!entry->nr)
  45. diff --git a/src/utils/crc32.c b/src/utils/crc32.c
  46. index 12d9e2a70..371254994 100644
  47. --- a/src/utils/crc32.c
  48. +++ b/src/utils/crc32.c
  49. @@ -72,7 +72,7 @@ static const u32 crc32_table[256] = {
  50. };
  51. -u32 crc32(const u8 *frame, size_t frame_len)
  52. +u32 ieee80211_crc32(const u8 *frame, size_t frame_len)
  53. {
  54. size_t i;
  55. u32 crc;
  56. diff --git a/src/utils/crc32.h b/src/utils/crc32.h
  57. index dc31399be..71a19dc5f 100644
  58. --- a/src/utils/crc32.h
  59. +++ b/src/utils/crc32.h
  60. @@ -9,6 +9,6 @@
  61. #ifndef CRC32_H
  62. #define CRC32_H
  63. -u32 crc32(const u8 *frame, size_t frame_len);
  64. +u32 ieee80211_crc32(const u8 *frame, size_t frame_len);
  65. #endif /* CRC32_H */
  66. --
  67. 2.37.1