opengnsys_ipxe/src
Michael J. Bazzinotti 0de5e60144 [libc] Fix memcmp() to return proper values
Fix memcmp() to return proper standard positive/negative values for
unequal comparisons.  Current implementation is backwards (i.e. the
functions are returning negative when should be positive and
vice-versa).

Currently most consumers of these functions only check the return value
for ==0 or !=0 and so we can safely change the implementation without
breaking things.

However, there is one call that checks the polarity of this function,
and that is prf_sha1() for wireless WPA 4-way handshake.  Due to the
incorrect memcmp() polarity, the WPA handshake creates an incorrect
PTK, and the handshake would fail after step 2.  Undoubtedly, the AP
noticed the supplicant failed the mic check.  This commit fixes that
issue.

Similar to commit 3946aa9 ("[libc] Fix strcmp()/strncmp() to return
proper values").

Signed-off-by: Michael Bazzinotti <bazz@bazz1.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2020-07-21 15:29:18 +01:00
..
arch [pcbios] Take alignment into account when checking for available space 2020-07-21 14:51:32 +01:00
bin Rename .cvsignore files to .gitignore 2007-06-09 22:57:00 +01:00
config [efi] Avoid setting direction flag on EFI platforms 2020-07-07 14:08:05 +01:00
core [libc] Fix memcmp() to return proper values 2020-07-21 15:29:18 +01:00
crypto [ocsp] Accept SHA1 certID responses even if SHA1 is not enabled 2020-06-25 13:04:54 +01:00
doc [build] Rename gPXE to iPXE 2010-04-19 23:43:39 +01:00
drivers [sfc] Add PCI ID for Solarflare SFC9120 and Solarflare SFC9140 2020-07-15 12:29:46 +01:00
hci [init] Show startup and shutdown function names in debug messages 2019-01-25 14:53:43 +00:00
image [efi] Work around UEFI specification bug in LoadImage 2020-06-04 22:40:35 +01:00
include [xfer] Remove address family from definition of a socket opener 2020-07-15 18:46:58 +01:00
interface [efi] Claim SNP devices early in efi_download_start() 2020-07-15 10:09:46 +01:00
libgcc [libgcc] Change __divmoddi4 from int64 [unknown] to int64_t 2020-07-21 14:33:32 +01:00
net [dns] Use all configured DNS servers 2020-07-15 19:10:30 +01:00
scripts [efi] Centralise architecture-independent EFI Makefile and linker script 2016-03-12 21:47:13 +00:00
tests [libc] Fix memcmp() to return proper values 2020-07-21 15:29:18 +01:00
usr [image] Omit URI query string and fragment from download progress messages 2017-12-28 13:42:44 +00:00
util [build] Fix default target in sdsk image 2020-07-21 14:29:12 +01:00
.gitignore [build] Add support for local configuration files 2010-03-26 19:07:22 +00:00
Makefile [bnxt] Add driver support for Broadcom NetXtreme-E Adapters 2020-05-06 15:41:45 +01:00
Makefile.efi [efi] Enable stack protection where possible 2020-06-24 16:23:21 +01:00
Makefile.housekeeping [build] Be explicit about -fcommon compiler directive 2020-06-27 21:16:07 +01:00
doxygen.cfg [build] Remove PACKED macro 2010-05-29 23:49:47 +01:00