summaryrefslogtreecommitdiff
path: root/src/openvpn/socket.c
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2013-06-03 18:47:54 +0200
committerAlberto Gonzalez Iniesta <agi@inittab.org>2013-06-03 18:47:54 +0200
commitc7f5b684601f45769f7e3252a407be748d1fc2ca (patch)
tree940368aafbfb471169a19bb16a2275be179d4c5a /src/openvpn/socket.c
parent31feacd9451b798cb0b29b42298eddaba3f697ee (diff)
parent70b71e008cc968ee53d6b8af9f7a006f13c27e2a (diff)
Merge tag 'upstream/2.3.2'
Upstream version 2.3.2
Diffstat (limited to 'src/openvpn/socket.c')
-rw-r--r--src/openvpn/socket.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c
index 8eb112b..85f783a 100644
--- a/src/openvpn/socket.c
+++ b/src/openvpn/socket.c
@@ -2786,6 +2786,7 @@ link_socket_write_udp_posix_sendmsg (struct link_socket *sock,
struct iovec iov;
struct msghdr mesg;
struct cmsghdr *cmsg;
+ union openvpn_pktinfo opi;
iov.iov_base = BPTR (buf);
iov.iov_len = BLEN (buf);
@@ -2795,11 +2796,10 @@ link_socket_write_udp_posix_sendmsg (struct link_socket *sock,
{
case AF_INET:
{
- struct openvpn_in4_pktinfo msgpi4;
mesg.msg_name = &to->dest.addr.sa;
mesg.msg_namelen = sizeof (struct sockaddr_in);
- mesg.msg_control = &msgpi4;
- mesg.msg_controllen = sizeof msgpi4;
+ mesg.msg_control = &opi;
+ mesg.msg_controllen = sizeof (struct openvpn_in4_pktinfo);
mesg.msg_flags = 0;
cmsg = CMSG_FIRSTHDR (&mesg);
cmsg->cmsg_len = sizeof (struct openvpn_in4_pktinfo);
@@ -2824,12 +2824,11 @@ link_socket_write_udp_posix_sendmsg (struct link_socket *sock,
}
case AF_INET6:
{
- struct openvpn_in6_pktinfo msgpi6;
struct in6_pktinfo *pkti6;
mesg.msg_name = &to->dest.addr.sa;
mesg.msg_namelen = sizeof (struct sockaddr_in6);
- mesg.msg_control = &msgpi6;
- mesg.msg_controllen = sizeof msgpi6;
+ mesg.msg_control = &opi;
+ mesg.msg_controllen = sizeof (struct openvpn_in6_pktinfo);
mesg.msg_flags = 0;
cmsg = CMSG_FIRSTHDR (&mesg);
cmsg->cmsg_len = sizeof (struct openvpn_in6_pktinfo);