summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGert Doering <gert@greenie.muc.de>2012-12-19 22:12:41 +0100
committerDavid Sommerseth <davids@redhat.com>2012-12-20 09:55:37 +0100
commitd39f31d96378aa5eeade74670ffd9e08bf4c7234 (patch)
treeea8505f2038a4ca7f94c7e616725ade7ad5fafb8 /src
parent3b860cf27b9374f6ebe67ff21011661f8ec391c6 (diff)
downloadopenvpn-d39f31d96378aa5eeade74670ffd9e08bf4c7234.tar.gz
openvpn-d39f31d96378aa5eeade74670ffd9e08bf4c7234.tar.xz
openvpn-d39f31d96378aa5eeade74670ffd9e08bf4c7234.zip
Fix parameter type for IP_TOS setsockopt on non-Linux systems.
Linux uses uint8_t, all BSD based stacks and Solaris use "int" (Windows documentation says "DWORD" and "do not use, use QoS API instead"). Bug reported and fix provided by Torsten Vielhak and Jeremie Le Hen. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 20121219212619.GN22465@greenie.muc.de URL: http://article.gmane.org/gmane.network.openvpn.devel/7207 Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/openvpn/socket.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openvpn/socket.h b/src/openvpn/socket.h
index 9cb01fa..4e7e7f8 100644
--- a/src/openvpn/socket.h
+++ b/src/openvpn/socket.h
@@ -237,7 +237,11 @@ struct link_socket
#if PASSTOS_CAPABILITY
/* used to get/set TOS. */
+#if defined(TARGET_LINUX)
uint8_t ptos;
+#else /* all the BSDs, Solaris, MacOS use plain "int" -> see "man ip" there */
+ int ptos;
+#endif
bool ptos_defined;
#endif