is nl-route-add broken in 3.0?

Tomas Weinfurt tweinfurt at yahoo.com
Fri May 6 19:19:15 EDT 2011


Hello all,
I've been doing some testing with libnl30 (+kernel 2.6.35) and I cannot make 
nl-route-add to work. 


#ifconfig eth5 
eth5   Link encap:Ethernet  HWaddr 00:90:7F:82:7D:C1  
          inet addr:10.0.5.1  Bcast:10.0.5.255  Mask:255.255.255.0
          inet6 addr: fe80::290:7fff:fe82:7dc1/64 Scope:Link
          inet6 addr: 2010::1/64 Scope:Global

so I'm trying to add IPv6 route via local subnet.

nl-route-add -d 2011::1/64 -n via=2010::5
Error: Unable to add route: Unspecific failure

I think the syntax is right since it does work for IPv4.

nl-route-add -d 11.0.0.0/24 -n via=10.0.5.5
Added inet 11.0.0.0/24 via 10.0.5.5

I did also testing with libnl1.1 and it also works fine iin same networking 
setup. (nl-route-add dst  2011::1/64 via 2010::5) 


One thing changed in 3.0 is way how routes are added. It seems like it is always 
added as nested RTA_MULTIPATH message. 

I could be wrong but I have not seen any handling of that inside kerenl on IPv6 
side (unlike IPv4). 


furt at nirvana:/tmp/linux-2.6.38.5/net>grep  -lr RTA_MULTIPATH * 
decnet/dn_fib.c
decnet/dn_table.c
ipv4/fib_semantics.c
ipv4/fib_frontend.c
ipv4/ipmr.c
ipv6/ip6mr.c

based on traces I put inside kerenl it is failing in net/ipv6/route.c: 
ip6_route_add() function on following check:
    err = -ENODEV;
    if (dev == NULL)
        goto out;

Any feedback is appreciated. 

Tomas




More information about the libnl mailing list