Interesting. I wonder if a better solution might be to bracket the
struct openvpn_pktinfo definition with
#pragma pack(1)
...
#pragma pack()
James
Tim Davies wrote:
After attempting to use OpenVPN 2.1_rc7 on a 64 bit Centos 5 platform,
I came across a peculiar error when enabling multihome. Basically no
UDP packets were allowed to send due to an incorrect size being set.
The problem seems to be in socket.c, where sizeof(opi) is incorrect.
The structure is defined as:
struct openvpn_pktinfo
{
struct cmsghdr cmsghdr;
struct in_pktinfo in_pktinfo;
};
On a 64 bit platform, sizeof(struct cmsghdr) is 16, and sizeof(struct
in_pktinfo) is 12. Due to structure padding, sizeof(struct
openvpn_pktinfo) is 32, not 28.
The attached patch fixed the problem, although I'm not sure it's the
best way to go about it.
Tim.
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
------------------------------------------------------------------------
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel