]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix connection cookie not including address and fix endianness in test
authorArne Schwabe <arne@rfc2549.org>
Tue, 6 Dec 2022 13:36:47 +0000 (14:36 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 6 Dec 2022 15:50:47 +0000 (16:50 +0100)
commit3e63dc9b184b17674dfea3cea7eb55ce15779fb2
treecdd7933f66c1bf631f156cfb3d22b1744758a66a
parente778a6fd26d849dc0232950aab6a82ba10789a9e
Fix connection cookie not including address and fix endianness in test

We accidentially checked the adress family size instead of the address
family.

For  unit test checks we need to consider endianess to ensure the hmac
for the adress is always the same. The real code does not care about
endian since it only needs it to be same on the same architecture.

Converting the session to endianess is strictly speaking unecessary
for the actual function of the function but is almost no overhead
and makes the unit testing more robust.

Reported by David trying to the package on Red Hat/s390x and painfully
debugged by setting up a s390x qemu machine that takes 40s just to
run ./configure.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20221206133647.954724-1-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25619.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit 67bef0357280040b83f2185c91c4f830ba542d6b)
src/openvpn/ssl_pkt.c
tests/unit_tests/openvpn/test_pkt.c