Thread (12 messages) flat view 12 messages, 5 authors, 2017-10-05

Re: cross namespace interface notification for tun devices

From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: 2017-09-19 01:24:08

On Mon, Sep 18, 2017 at 8:47 PM, Jason A. Donenfeld [off-list ref] wrote:
The best I've come up with is, in a sleep loop, writing to the tun
device's fd something with a NULL or invalid payload. If the interface
is down, the kernel returns -EIO. If the interface is up, the kernel
returns -EINVAL. This seems to be a reliable distinguisher, but is a
pretty insane way of doing it. And sleep loops are somewhat different
from events too.
Specifically, I'm referring to the horrific hack exemplified in the
attached .c file, in case anybody is curious about the details of what
I'd rather not use.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help