]> 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:47:21 +0000 (16:47 +0100)
commit67bef0357280040b83f2185c91c4f830ba542d6b
tree174deb24049eb9dd611bf2d087253ad13f152512
parent4ab53d48f430a9b08e98c9cda5c2dcfa935af158
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>
src/openvpn/ssl_pkt.c
tests/unit_tests/openvpn/test_pkt.c