]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix unaligned access in macOS, FreeBSD, Solaris hwaddr
authorArne Schwabe <arne@rfc2549.org>
Sun, 31 Dec 2023 17:34:31 +0000 (18:34 +0100)
committerGert Doering <gert@greenie.muc.de>
Sun, 31 Dec 2023 17:45:29 +0000 (18:45 +0100)
commitf13331005d5a75f2788685485d46be1fe2f133a1
tree3948d6ff854cf752fa3a4fd275ba90b044b0a18b
parent21910ebc2ee8a6138eb2af8d38056d2b94e59f9c
Fix unaligned access in macOS, FreeBSD, Solaris hwaddr

The undefined behaviour USAN clang checker found this.

This fix is a bit messy but so are the original structures.

Since the API on Solaris/Illuminos does not return the AF_LINK
sockaddr type we are interested in, there is little value in
fixing the code on that platform to iterate through a list
that does not contain the element we are looking for.

Add includes stddef.h for offsetof and integer.h for max_int.

Change-Id: Ia797c8801fa9a9bc10b6674efde5fdbd7132e4a8
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20231231173431.31356-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27885.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/route.c