Hi, On Mon, Dec 17, 2012 at 11:03:55PM +0100, Jeremie Le Hen wrote: > I thereby kindly ask you to bring this patch in the source tree. I > don't know about your release procedure, but it would be really nice if > it could hit the tree before 2.3 is released.
Thanks for the excessive links to documentation - it helps verifying things. I agree that this is a useful last-minute correction and should go in (feature-ACK). I don't particularily like the way your patch is coded, though, as it's "all of them but Linux" that have "int" here (except Windows, which uses DWORD, but the docs say "use QoS API instead") - too many #ifdefs. http://msdn.microsoft.com/en-us/library/windows/desktop/ms738586(v=vs.85).aspx so I'd propose to #ifdef it differently, patch appended. gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
From b6e0f27b4e6965de14cf0ec3e901a52d256cc88a Mon Sep 17 00:00:00 2001 From: Gert Doering <g...@greenie.muc.de> List-Post: openvpn-devel@lists.sourceforge.net Date: Wed, 19 Dec 2012 22:12:41 +0100 Subject: [PATCH] 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 <g...@greenie.muc.de> --- src/openvpn/socket.h | 4 ++++ 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 -- 1.7.8.6
pgp4lg9AB5q6B.pgp
Description: PGP signature