[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

Re: [Openvpn-users] OpenVPN failure traced to bug in tun driver (with fix)


  • Subject: Re: [Openvpn-users] OpenVPN failure traced to bug in tun driver (with fix)
  • From: Steven Rowe <sarowe@xxxxxxx>
  • Date: Thu, 22 Dec 2005 22:17:46 -0500

Hi Jeff,

Jeff Stearns wrote:
The bug in the tun-1.1 driver definitely affects Linux 2.2 and 2.4.

This was fixed in Linux 2.4.6, which included the tun-1.4 driver; the tun-1.3 driver still had this problem.

Below is the (latest stable 2.4) Linux 2.4.32 version of the function in
question, from drivers/net/tun.c:

static unsigned int tun_chr_poll(struct file *file, poll_table * wait)
{
    struct tun_struct *tun = (struct tun_struct *)file->private_data;
    unsigned int mask = POLLOUT | POLLWRNORM;

    if (!tun)
        return -EBADFD;

    DBG(KERN_INFO "%s: tun_chr_poll\n", tun->name);

    poll_wait(file, &tun->read_wait, wait);

    if (skb_queue_len(&tun->readq))
        mask |= POLLIN | POLLRDNORM;

    return mask;
}


____________________________________________ Openvpn-users mailing list Openvpn-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/openvpn-users