• Pavel Emelyanov's avatar
    tun: Dump tun files and tun links · a3e53658
    Pavel Emelyanov authored
    The major issue with dump is -- some info id get via netlink,
    some via sysfs and some (!) via opened and attached tun file.
    But the latter cannot be created, if there's another one attached
    (or the mq device is full with threads).
    
    Thus we have to dump this info via existing tun file and keep one
    in memory till the link dump code takes place.
    
    Opposite situation is also possible -- we can have a persistent
    unattached device. In this case we have to attach to it, dump
    things and detach back.
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    a3e53658
files.c 19.1 KB