Attention is currently required from: Arne Schwabe.
Hello Arne Schwabe,
I'd like you to reexamine a change. Please visit
https://gerrit.openvpn.net/c/openvpn/+/2192?usp=email
to look at the new patch set (#2).
Change subject: socks: convert service port to host byte order
......................................................................
socks: convert service port to host byte order
getservbyname() returns s_port in network byte order, but the caller
splits the port as a host-order value. On little-endian hosts a remote
port given as a service name (e.g. "https") was sent byte-swapped in the
SOCKS5 CONNECT request.
To test, connect with "--remote foobar https --socks-proxy <host> <port>"
and check the port the SOCKS proxy is asked to connect to: 443 with the
fix, 47873 (0xbb01) without it.
Change-Id: Ic3e13e414b3c64cdafb57dcfe9d396159f8f5f44
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpn/socks.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/92/2192/2
diff --git a/src/openvpn/socks.c b/src/openvpn/socks.c
index 51e3a1e..5cd6d8b 100644
--- a/src/openvpn/socks.c
+++ b/src/openvpn/socks.c
@@ -332,7 +332,7 @@
const struct servent *service = getservbyname(servname, NULL);
if (service)
{
- return service->s_port;
+ return ntohs((uint16_t)service->s_port);
}
return 0;
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2192?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic3e13e414b3c64cdafb57dcfe9d396159f8f5f44
Gerrit-Change-Number: 2192
Gerrit-PatchSet: 2
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel