* [Buildroot] [PATCH v2 0/2] hostapd/wpa_s: fix static build issue with zlib-ng
@ 2022-09-16 21:00 Sergey Matyukevich
2022-09-16 21:00 ` [Buildroot] [PATCH v2 1/2] package/hostapd: " Sergey Matyukevich
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sergey Matyukevich @ 2022-09-16 21:00 UTC (permalink / raw)
To: buildroot; +Cc: Sergey Matyukevich, Matt Weber, Thomas Petazzoni
Hi all,
Both zlib-ng and hostapd/wpa_supplicant define functions with the same
name 'crc32'. Buildroot autobuilder detected configurations that failed
to build due to the naming conflict between hostapd and zlib-ng.
This patch series applies appropriate hostapd upstream fix that renames
'crc32' function to a less generic name, see:
http://w1.fi/cgit/hostap/commit/?id=0c7b3814ca6070a8e930dea09fde08b4058a4ca6
Regards,
Sergey
v1 -> v2
- replace weird Kconfig dependencies by upstream hostapd patch
Sergey Matyukevich (2):
package/hostapd: fix static build issue with zlib-ng
package/wpa_supplicant: fix static build issue with zlib-ng
...ic-name-for-IEEE802.11-CRC-32-routin.patch | 101 ++++++++++++++++++
...se-a-less-generic-name-for-IEEE802.1.patch | 78 ++++++++++++++
2 files changed, 179 insertions(+)
create mode 100644 package/hostapd/0001-use-a-less-generic-name-for-IEEE802.11-CRC-32-routin.patch
create mode 100644 package/wpa_supplicant/0002-wpa_supplicant-use-a-less-generic-name-for-IEEE802.1.patch
--
2.37.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v2 1/2] package/hostapd: fix static build issue with zlib-ng
2022-09-16 21:00 [Buildroot] [PATCH v2 0/2] hostapd/wpa_s: fix static build issue with zlib-ng Sergey Matyukevich
@ 2022-09-16 21:00 ` Sergey Matyukevich
2022-11-13 16:47 ` Peter Korsgaard
2022-09-16 21:00 ` [Buildroot] [PATCH v2 2/2] package/wpa_supplicant: " Sergey Matyukevich
2022-10-31 12:19 ` [Buildroot] [PATCH v2 0/2] hostapd/wpa_s: " Thomas Petazzoni via buildroot
2 siblings, 1 reply; 6+ messages in thread
From: Sergey Matyukevich @ 2022-09-16 21:00 UTC (permalink / raw)
To: buildroot; +Cc: Sergey Matyukevich, Matt Weber, Thomas Petazzoni
Hostapd uses 'crc32' name for IEEE802.11 CRC-32 routine. This name is
too generic. Buildroot autobuilder detected configurations that failed
to build due to the naming conflict with zlib-ng.
Add hostapd part of the upstream patch that renames 'crc32' function
to a less generic 'ieee80211_crc32' name.
Fixes: http://autobuild.buildroot.net/results/9901df820d3afa4cde78e8ad6d62cb8ce7e69fdb/
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
...ic-name-for-IEEE802.11-CRC-32-routin.patch | 101 ++++++++++++++++++
1 file changed, 101 insertions(+)
create mode 100644 package/hostapd/0001-use-a-less-generic-name-for-IEEE802.11-CRC-32-routin.patch
diff --git a/package/hostapd/0001-use-a-less-generic-name-for-IEEE802.11-CRC-32-routin.patch b/package/hostapd/0001-use-a-less-generic-name-for-IEEE802.11-CRC-32-routin.patch
new file mode 100644
index 0000000000..e1c923880c
--- /dev/null
+++ b/package/hostapd/0001-use-a-less-generic-name-for-IEEE802.11-CRC-32-routin.patch
@@ -0,0 +1,101 @@
+From 9896d8c116f054cebc49928404018a75c9b892cb Mon Sep 17 00:00:00 2001
+From: Sergey Matyukevich <geomatsi@gmail.com>
+Date: Fri, 16 Sep 2022 23:18:50 +0300
+Subject: [PATCH] hostapd: use a less generic name for IEEE802.11 CRC-32 routine
+
+Hostapd uses 'crc32' name for IEEE802.11 CRC-32 routine. This name is
+too generic. Buildroot autobuilder detected build configuration that
+failed to build due to the naming conflict: static linking with openssl
+using zlib-ng as a zlib provider, e.g. see:
+- http://autobuild.buildroot.net/results/9901df820d3afa4cde78e8ad6d62cb8ce7e69fdb/
+- http://autobuild.buildroot.net/results/ac19975f0bf77f4a8ca574c374092ba81cd5a332/
+
+Use a less generic name ieee80211_crc32 for IEEE802.11 CRC-32 routine
+to avoid such naming conflicts.
+
+Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
+---
+ hostapd/config_file.c | 4 ++--
+ src/ap/hostapd.c | 3 ++-
+ src/ap/neighbor_db.c | 2 +-
+ src/utils/crc32.c | 2 +-
+ src/utils/crc32.h | 2 +-
+ 5 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/hostapd/config_file.c b/hostapd/config_file.c
+index b14728d1b..b38a84647 100644
+--- a/hostapd/config_file.c
++++ b/hostapd/config_file.c
+@@ -2407,7 +2407,7 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+ }
+ os_memcpy(ssid->ssid, pos, ssid->ssid_len);
+ ssid->ssid_set = 1;
+- ssid->short_ssid = crc32(ssid->ssid, ssid->ssid_len);
++ ssid->short_ssid = ieee80211_crc32(ssid->ssid, ssid->ssid_len);
+ } else if (os_strcmp(buf, "ssid2") == 0) {
+ struct hostapd_ssid *ssid = &bss->ssid;
+ size_t slen;
+@@ -2421,7 +2421,7 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+ os_memcpy(ssid->ssid, str, slen);
+ ssid->ssid_len = slen;
+ ssid->ssid_set = 1;
+- ssid->short_ssid = crc32(ssid->ssid, ssid->ssid_len);
++ ssid->short_ssid = ieee80211_crc32(ssid->ssid, ssid->ssid_len);
+ os_free(str);
+ } else if (os_strcmp(buf, "utf8_ssid") == 0) {
+ bss->ssid.utf8_ssid = atoi(pos) > 0;
+diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
+index 4b88641a2..56c8fb90e 100644
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -1230,7 +1230,8 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
+ * Short SSID calculation is identical to FCS and it is defined in
+ * IEEE P802.11-REVmd/D3.0, 9.4.2.170.3 (Calculating the Short-SSID).
+ */
+- conf->ssid.short_ssid = crc32(conf->ssid.ssid, conf->ssid.ssid_len);
++ conf->ssid.short_ssid = ieee80211_crc32(conf->ssid.ssid,
++ conf->ssid.ssid_len);
+
+ if (!hostapd_drv_none(hapd)) {
+ wpa_printf(MSG_DEBUG, "Using interface %s with hwaddr " MACSTR
+diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
+index 229edd2a9..ef17634c3 100644
+--- a/src/ap/neighbor_db.c
++++ b/src/ap/neighbor_db.c
+@@ -136,7 +136,7 @@ int hostapd_neighbor_set(struct hostapd_data *hapd, const u8 *bssid,
+
+ os_memcpy(entry->bssid, bssid, ETH_ALEN);
+ os_memcpy(&entry->ssid, ssid, sizeof(entry->ssid));
+- entry->short_ssid = crc32(ssid->ssid, ssid->ssid_len);
++ entry->short_ssid = ieee80211_crc32(ssid->ssid, ssid->ssid_len);
+
+ entry->nr = wpabuf_dup(nr);
+ if (!entry->nr)
+diff --git a/src/utils/crc32.c b/src/utils/crc32.c
+index 12d9e2a70..371254994 100644
+--- a/src/utils/crc32.c
++++ b/src/utils/crc32.c
+@@ -72,7 +72,7 @@ static const u32 crc32_table[256] = {
+ };
+
+
+-u32 crc32(const u8 *frame, size_t frame_len)
++u32 ieee80211_crc32(const u8 *frame, size_t frame_len)
+ {
+ size_t i;
+ u32 crc;
+diff --git a/src/utils/crc32.h b/src/utils/crc32.h
+index dc31399be..71a19dc5f 100644
+--- a/src/utils/crc32.h
++++ b/src/utils/crc32.h
+@@ -9,6 +9,6 @@
+ #ifndef CRC32_H
+ #define CRC32_H
+
+-u32 crc32(const u8 *frame, size_t frame_len);
++u32 ieee80211_crc32(const u8 *frame, size_t frame_len);
+
+ #endif /* CRC32_H */
+--
+2.37.1
+
--
2.37.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/wpa_supplicant: fix static build issue with zlib-ng
2022-09-16 21:00 [Buildroot] [PATCH v2 0/2] hostapd/wpa_s: fix static build issue with zlib-ng Sergey Matyukevich
2022-09-16 21:00 ` [Buildroot] [PATCH v2 1/2] package/hostapd: " Sergey Matyukevich
@ 2022-09-16 21:00 ` Sergey Matyukevich
2022-11-13 16:48 ` Peter Korsgaard
2022-10-31 12:19 ` [Buildroot] [PATCH v2 0/2] hostapd/wpa_s: " Thomas Petazzoni via buildroot
2 siblings, 1 reply; 6+ messages in thread
From: Sergey Matyukevich @ 2022-09-16 21:00 UTC (permalink / raw)
To: buildroot; +Cc: Sergey Matyukevich, Matt Weber, Thomas Petazzoni
Hostapd/wpa_s uses 'crc32' name for IEEE802.11 CRC-32 routine. This name
is too generic. Buildroot autobuilder detected configurations that failed
to build due to the naming conflict with zlib-ng.
Add wpa_supplicant part of the upstream patch that renames 'crc32'
function to a less generic 'ieee80211_crc32' name.
Fixes: http://autobuild.buildroot.net/results/ac19975f0bf77f4a8ca574c374092ba81cd5a332/
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
...se-a-less-generic-name-for-IEEE802.1.patch | 78 +++++++++++++++++++
1 file changed, 78 insertions(+)
create mode 100644 package/wpa_supplicant/0002-wpa_supplicant-use-a-less-generic-name-for-IEEE802.1.patch
diff --git a/package/wpa_supplicant/0002-wpa_supplicant-use-a-less-generic-name-for-IEEE802.1.patch b/package/wpa_supplicant/0002-wpa_supplicant-use-a-less-generic-name-for-IEEE802.1.patch
new file mode 100644
index 0000000000..f1583e2080
--- /dev/null
+++ b/package/wpa_supplicant/0002-wpa_supplicant-use-a-less-generic-name-for-IEEE802.1.patch
@@ -0,0 +1,78 @@
+From c8af2e431b47d7d900e0c7359705aaa1096d302a Mon Sep 17 00:00:00 2001
+From: Sergey Matyukevich <geomatsi@gmail.com>
+Date: Fri, 16 Sep 2022 23:18:50 +0300
+Subject: [PATCH] wpa_supplicant: use a less generic name for IEEE802.11 CRC-32 routine
+
+Hostapd uses 'crc32' name for IEEE802.11 CRC-32 routine. This name is
+too generic. Buildroot autobuilder detected build configuration that
+failed to build due to the naming conflict: static linking with openssl
+using zlib-ng as a zlib provider, e.g. see:
+- http://autobuild.buildroot.net/results/9901df820d3afa4cde78e8ad6d62cb8ce7e69fdb/
+- http://autobuild.buildroot.net/results/ac19975f0bf77f4a8ca574c374092ba81cd5a332/
+
+Use a less generic name ieee80211_crc32 for IEEE802.11 CRC-32 routine
+to avoid such naming conflicts.
+
+Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
+---
+ src/ap/hostapd.c | 3 ++-
+ src/ap/neighbor_db.c | 2 +-
+ src/utils/crc32.c | 2 +-
+ src/utils/crc32.h | 2 +-
+ 4 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
+index 4b88641a2..56c8fb90e 100644
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -1230,7 +1230,8 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
+ * Short SSID calculation is identical to FCS and it is defined in
+ * IEEE P802.11-REVmd/D3.0, 9.4.2.170.3 (Calculating the Short-SSID).
+ */
+- conf->ssid.short_ssid = crc32(conf->ssid.ssid, conf->ssid.ssid_len);
++ conf->ssid.short_ssid = ieee80211_crc32(conf->ssid.ssid,
++ conf->ssid.ssid_len);
+
+ if (!hostapd_drv_none(hapd)) {
+ wpa_printf(MSG_DEBUG, "Using interface %s with hwaddr " MACSTR
+diff --git a/src/ap/neighbor_db.c b/src/ap/neighbor_db.c
+index 229edd2a9..ef17634c3 100644
+--- a/src/ap/neighbor_db.c
++++ b/src/ap/neighbor_db.c
+@@ -136,7 +136,7 @@ int hostapd_neighbor_set(struct hostapd_data *hapd, const u8 *bssid,
+
+ os_memcpy(entry->bssid, bssid, ETH_ALEN);
+ os_memcpy(&entry->ssid, ssid, sizeof(entry->ssid));
+- entry->short_ssid = crc32(ssid->ssid, ssid->ssid_len);
++ entry->short_ssid = ieee80211_crc32(ssid->ssid, ssid->ssid_len);
+
+ entry->nr = wpabuf_dup(nr);
+ if (!entry->nr)
+diff --git a/src/utils/crc32.c b/src/utils/crc32.c
+index 12d9e2a70..371254994 100644
+--- a/src/utils/crc32.c
++++ b/src/utils/crc32.c
+@@ -72,7 +72,7 @@ static const u32 crc32_table[256] = {
+ };
+
+
+-u32 crc32(const u8 *frame, size_t frame_len)
++u32 ieee80211_crc32(const u8 *frame, size_t frame_len)
+ {
+ size_t i;
+ u32 crc;
+diff --git a/src/utils/crc32.h b/src/utils/crc32.h
+index dc31399be..71a19dc5f 100644
+--- a/src/utils/crc32.h
++++ b/src/utils/crc32.h
+@@ -9,6 +9,6 @@
+ #ifndef CRC32_H
+ #define CRC32_H
+
+-u32 crc32(const u8 *frame, size_t frame_len);
++u32 ieee80211_crc32(const u8 *frame, size_t frame_len);
+
+ #endif /* CRC32_H */
+--
+2.37.1
+
--
2.37.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 0/2] hostapd/wpa_s: fix static build issue with zlib-ng
2022-09-16 21:00 [Buildroot] [PATCH v2 0/2] hostapd/wpa_s: fix static build issue with zlib-ng Sergey Matyukevich
2022-09-16 21:00 ` [Buildroot] [PATCH v2 1/2] package/hostapd: " Sergey Matyukevich
2022-09-16 21:00 ` [Buildroot] [PATCH v2 2/2] package/wpa_supplicant: " Sergey Matyukevich
@ 2022-10-31 12:19 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-10-31 12:19 UTC (permalink / raw)
To: Sergey Matyukevich; +Cc: Matt Weber, buildroot
Hello Sergey,
On Sat, 17 Sep 2022 00:00:57 +0300
Sergey Matyukevich <geomatsi@gmail.com> wrote:
> This patch series applies appropriate hostapd upstream fix that renames
> 'crc32' function to a less generic name, see:
> http://w1.fi/cgit/hostap/commit/?id=0c7b3814ca6070a8e930dea09fde08b4058a4ca6
Thanks for pushing it upstream! This link should have been added in
each patch, so that we know their upstream status.
I fixed that up and applied both patches. Once again, many thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] package/hostapd: fix static build issue with zlib-ng
2022-09-16 21:00 ` [Buildroot] [PATCH v2 1/2] package/hostapd: " Sergey Matyukevich
@ 2022-11-13 16:47 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2022-11-13 16:47 UTC (permalink / raw)
To: Sergey Matyukevich; +Cc: Matt Weber, Thomas Petazzoni, buildroot
>>>>> "Sergey" == Sergey Matyukevich <geomatsi@gmail.com> writes:
> Hostapd uses 'crc32' name for IEEE802.11 CRC-32 routine. This name is
> too generic. Buildroot autobuilder detected configurations that failed
> to build due to the naming conflict with zlib-ng.
> Add hostapd part of the upstream patch that renames 'crc32' function
> to a less generic 'ieee80211_crc32' name.
> Fixes: http://autobuild.buildroot.net/results/9901df820d3afa4cde78e8ad6d62cb8ce7e69fdb/
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Committed to 2022.08.x and 2022.02.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/wpa_supplicant: fix static build issue with zlib-ng
2022-09-16 21:00 ` [Buildroot] [PATCH v2 2/2] package/wpa_supplicant: " Sergey Matyukevich
@ 2022-11-13 16:48 ` Peter Korsgaard
0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2022-11-13 16:48 UTC (permalink / raw)
To: Sergey Matyukevich; +Cc: Matt Weber, Thomas Petazzoni, buildroot
>>>>> "Sergey" == Sergey Matyukevich <geomatsi@gmail.com> writes:
> Hostapd/wpa_s uses 'crc32' name for IEEE802.11 CRC-32 routine. This name
> is too generic. Buildroot autobuilder detected configurations that failed
> to build due to the naming conflict with zlib-ng.
> Add wpa_supplicant part of the upstream patch that renames 'crc32'
> function to a less generic 'ieee80211_crc32' name.
> Fixes: http://autobuild.buildroot.net/results/ac19975f0bf77f4a8ca574c374092ba81cd5a332/
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Committed to 2022.08.x and 2022.02.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-13 16:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-16 21:00 [Buildroot] [PATCH v2 0/2] hostapd/wpa_s: fix static build issue with zlib-ng Sergey Matyukevich
2022-09-16 21:00 ` [Buildroot] [PATCH v2 1/2] package/hostapd: " Sergey Matyukevich
2022-11-13 16:47 ` Peter Korsgaard
2022-09-16 21:00 ` [Buildroot] [PATCH v2 2/2] package/wpa_supplicant: " Sergey Matyukevich
2022-11-13 16:48 ` Peter Korsgaard
2022-10-31 12:19 ` [Buildroot] [PATCH v2 0/2] hostapd/wpa_s: " Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.