TUN: File descriptor in bad state error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

    I have the following versions:

    Linux kernel: 2.4.12
    iptables version: 1.2.1a
    
    problem: 

    fd = open("/dev/net/tun", O_RDWR) runs fine and returns a file
descriptor.

    ifr.ifr_flags = IFF_TUN | IFF_NO_PI
    ioctl(fd, TUNSETIFF, (void*) &ifr) runs fine

    but:
    ioctl(fd, TUNSETNOCSUM, 1) fails with "file descriptor in bad state"
    fcntl(fd, F_SETFL, O-NONBLOCK|O_ASYNC) fails with "file descriptor in
bad state"

    Both these calls are done before the ioctl call for TUNSETIFF.

Thanks for your time
Srihari



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux