]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Fix datagram_overhead and assorted functions
authorArne Schwabe <arne@rfc2549.org>
Sat, 1 Jan 2022 16:25:22 +0000 (17:25 +0100)
committerGert Doering <gert@greenie.muc.de>
Wed, 2 Feb 2022 13:26:24 +0000 (14:26 +0100)
commita63a727b020ef42c475bd861b960200686359b2d
tree810405bc0b3031f09d36bc271e9c53aca5aa01fe
parent65a21eb14f4afd80864e88ff425f5d9ef8d8fdec
Fix datagram_overhead and assorted functions

This function is supposed to calculate the overhead of the protocol
header (IP/IPv6 + TCP/UDP). But at some point the index that used
to index the array proto_overhead and the associated PROTO_N went
completely out of sync. This fixed the function and related caller
to again calculate the overhead as intended.

Note that IPv6 mapped IPv4 addresses still have the wrong overhead
calculated as they treated are as IPv6 addresses (0:0:0:0:0:ffff::/96)

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20220101162532.2251835-5-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23504.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/forward.c
src/openvpn/socket.c
src/openvpn/socket.h