I've just tested this and it seems to work well.  Thanks.

James Yonan wrote:
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.



I've merged a patch into the subversion directory for the 2.1 series that addresses this using #pragma pack(1)

http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn/

It will be included in 2.1-rc8.  Let me know if it fixes the problem.

James


Reply via email to