Re[2]: [IMPORTANT] !!! tun ifaces don't visible by nfnetlink library

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

 



On Thursday 2010-02-18 21:00, Kuzin Andrey wrote:

>Patrick McHardy wrote:
>PM>I can't reproduce this hear with tap devices. Please try to
>PM>figure out whether there are no netlink messages for these
>PM>devices or whether userspace ignores them.
>
>Jan Engelhardt wrote:
>JE> Can't reproduce either. Andrey, also try `ip addr` besides
>JE> iftest, just to be really sure.
>
>This is my 'ip addr' results:
>[...]
>17: tun2: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc htb state UNKNOWN qlen 500
>    link/[65534]
>    inet 10.2.0.3 peer 10.2.0.4/32 scope global tun2
>24: tun1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc htb state UNKNOWN qlen 500
>    link/[65534]
>    inet 10.2.0.1 peer 10.2.0.2/32 scope global tun1
>
>root@banana:/tmp/tgz/libnfnetlink-1.0.0/utils# ./iftest
>[...]
>index (12) is eth0.2 (RUNNING)
>index (13) is eth0.3 (RUNNING)
>[stops at 13]
>
>Here is no iface eth0.5@eth0=14, and as i see tun ifaces both has
>'state UNKNOWN'
>I try to modify iftest to find error:
>
>      for (i=0; i<64; i++) {
>            char name[IFNAMSIZ];
>            unsigned int flags;
>
>            if (nlif_index2name(h, i, name) == -1) {
>                  printf("can't get name for index=%d\n",i);
>                  continue;
>            }
>            if (nlif_get_ifflags(h, i, &flags) == -1) {
>                  printf("can't get flags for index=%d\n",i);
>                  continue;
>            }
>            printf("index (%d) is %s (%s)\n", i, name,
>                  flags & IFF_RUNNING ? "RUNNING" : "NOT RUNNING");
>      }
>
>And here is result:
>./a.outnana:/tmp/tgz/libnfnetlink-1.0.0/utils#
>can't get flags for index=0
>index (1) is lo (RUNNING)
>index (2) is eth0 (RUNNING)
>index (3) is eth1 (RUNNING)
>index (4) is eth2 (RUNNING)
>index (5) is eth3 (RUNNING)
>index (6) is teql0 (NOT RUNNING)
>index (7) is tunl0 (NOT RUNNING)
>index (8) is gre0 (NOT RUNNING)
>index (9) is eth0.11 (RUNNING)
>index (10) is eth0.14 (RUNNING)
>index (11) is eth0.15 (RUNNING)
>index (12) is eth0.2 (RUNNING)
>index (13) is eth0.3 (RUNNING)
>can't get name for index=14
>can't get name for index=15
>can't get name for index=16
>can't get name for index=17
>can't get name for index=18
>can't get name for index=19
>can't get name for index=20
>can't get name for index=21
>can't get name for index=22
>can't get name for index=23
>can't get name for index=24
>can't get name for index=25
>can't get name for index=26
>can't get name for index=27
>..........
>can't get name for index=62
>can't get name for index=63
>
>I know only this way (described in iftest) how to get name of
>interface by index. May be another way ?
>I try to find source of "ip addr".
>But this is strange because in older kernel this code working right.


What would the first commit be where it stopped working?

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux