kqueue doesn't see if_tun

John-Mark Gurney gurney_j at resnet.uoregon.edu
Mon Jul 24 21:36:45 UTC 2006


David Gilbert wrote this message on Mon, Jul 24, 2006 at 15:19 -0400:
> I have some code that sets up a tunnel device and registers a kqueue
> filter for it ... ending roughly in:
> 
> EV_SET(&kqev, cons->tunSocket, EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, &cons->fsdkq);
> kevent(fsd->kq, &kqev, 1, NULL, 0, NULL);
> 
> This event never fires.  In another part of a the code, I have a timer
> --- so I call the tunnel reading function from there and (low and
> behold) there is a packet.
> 
> Does EVFILT_READ just not work on tunnel devices?

No one has written a d_kqfilter entry for tun... so, until someone
does, kqueue will not work on tun...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-hackers mailing list