Re: failed to set IPv6 default route



On Thu, 2012-09-27 at 12:55 +0200, Bjørn Mork wrote:
> Dan Williams <dcbw redhat com> writes:
> > On Mon, 2012-09-24 at 08:05 -0400, Gene Czarcinski wrote:
> >
> >>      ip  -6  route  add  default  via <fill_IPv6_address_of_'router'>  
> >> dev  eth0
> >
> > So that's essentially what NM is trying to do, actually, but NM is
> > trying to do it with netlink (which is what /sbin/ip uses too actually)
> > but apparently the netlink options we're adding aren't quite correct
> > here.  They unfortunately change periodically when kernel changes
> > happen.  -7 appears to be NLE_INVAL, which would indicate the kernel
> > doesn't think the route we gave it is valid.  We'd have to dig a bit
> > further down to figure out what that error actually is.
> >
> > Last time I had to do this, I had to rebuild /sbin/ip and make it print
> > out the exact netlink packet it was sending to the kernel.  Then I had
> > NM print out its packet and compared the two.  If only there was an
> > easier way...
> 
> strace -f -s 1024 ip route add ...?  Or use libnl?
> http://www.infradead.org/~tgr/libnl/
> 
> But I don't think the kernel APIs should change, so if that is really
> the problem then we should fix it.

I'd also used the tools from libnl's src/ directory and made them print
out the actual packets they sent, which is quite easy.  But since my
goal was to re-implement whatever /sbin/ip was doing using libnl code in
NM, I had to instrument /sbin/ip to figure that out.  Since /sbin/ip
always worked, but NM didn't, and the libnl src/ stuff couldn't quite do
it either.

But yeah, libnl has some pretty great debugging features.

Dan



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