tech-kern archive

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

Fixing tap(4) behaviour

Hi Folks,

People currently using qemu(1) need to use a dirty static fd-based
trick to link the created interface to qemu(1). This is due to the
fact that 1) qemu doesn't check the return value of the stat(2)
syscall and 2) our tap(4) cloner device provide nothing to know the
created interface's unit. I fixed this by making the cloner device
keep track of its associated vnode. When a stat(2) syscall is made on
the cloned fd, it will return the stat associated to the cloner's
vnode with just enough override to point to the cloned interface.

The code is available there for more information details (based on
early November -current):

Feel free to comment,

 - Arnaud

Home | Main Index | Thread Index | Old Index