Ticket #297: openvpn-2.3.1-udp-send.patch

File openvpn-2.3.1-udp-send.patch, 1.4 KB (added by danta, 8 years ago)
  • openvpn/src/openvpn/socket.c

     
    27862786  struct iovec iov;
    27872787  struct msghdr mesg;
    27882788  struct cmsghdr *cmsg;
     2789  union openvpn_pktinfo opi;
    27892790
    27902791  iov.iov_base = BPTR (buf);
    27912792  iov.iov_len = BLEN (buf);
     
    27952796    {
    27962797    case AF_INET:
    27972798      {
    2798         struct openvpn_in4_pktinfo msgpi4;
    27992799        mesg.msg_name = &to->dest.addr.sa;
    28002800        mesg.msg_namelen = sizeof (struct sockaddr_in);
    2801         mesg.msg_control = &msgpi4;
    2802         mesg.msg_controllen = sizeof msgpi4;
     2801        mesg.msg_control = &opi;
     2802        mesg.msg_controllen = sizeof (struct openvpn_in4_pktinfo);
    28032803        mesg.msg_flags = 0;
    28042804        cmsg = CMSG_FIRSTHDR (&mesg);
    28052805        cmsg->cmsg_len = sizeof (struct openvpn_in4_pktinfo);
     
    28242824      }
    28252825    case AF_INET6:
    28262826      {
    2827         struct openvpn_in6_pktinfo msgpi6;
    28282827        struct in6_pktinfo *pkti6;
    28292828        mesg.msg_name = &to->dest.addr.sa;
    28302829        mesg.msg_namelen = sizeof (struct sockaddr_in6);
    2831         mesg.msg_control = &msgpi6;
    2832         mesg.msg_controllen = sizeof msgpi6;
     2830        mesg.msg_control = &opi;
     2831        mesg.msg_controllen = sizeof (struct openvpn_in6_pktinfo);
    28332832        mesg.msg_flags = 0;
    28342833        cmsg = CMSG_FIRSTHDR (&mesg);
    28352834        cmsg->cmsg_len = sizeof (struct openvpn_in6_pktinfo);