← Back to team overview

desktop-packages team mailing list archive

[Bug 1312419] Re: nl_cache_refill; rtnl_neigh_get fail to find neighbors in cache

 

I can confirm this issue in Trusty (libnl3 version 3.2.21-1), relative to Precise (3.2.3-2ubuntu2). I can install the Precise binaries for:
  libnl-3-200
  libnl-3-dev
  libnl-genl-3-200
  libnl-genl-3-dev
  libnl-route-3-200
  libnl-route-3-dev
onto a Trusty system, and the issue goes away.

To reproduce, use the attached netlink-test.c and build/run like this:
  gcc -I/usr/include/libnl3 netlink-test.c -lnl-3 -lnl-route-3 -o netlink-test
  ./netlink-test 1.2.3.4

Or, for much more debugging output, run like:
  NLDBG=4  ./netlink-test 1.2.3.4

where 1.2.3.4 is the IP address of a neighboring machine (I used the output of
  route | sed -n '3{p;q}' | awk '{print $2}'
, which gives my router).

I recommend you try it in a Precise chroot (or just with the Precise
binaries listed above installed) first, so you can verify you have a
working IP address for the test. Then try it in Trusty and confirm the
failure.

With libnl3 binaries from Precise, I get:
  calling nl_socket_alloc
  calling rtnl_neigh_alloc_cache
  calling rtnl_neigh_get
  calling rtnl_neigh_get_lladdr
  hwLen: 6

But with Trusty's libnl3 stuff I get:
  calling nl_socket_alloc
  calling rtnl_neigh_alloc_cache
  calling rtnl_neigh_get
  rtnl_neigh_get returned NULL

The attached program code is not my authorship, but Carl Soeder, my
coworker at Akamai Technologies.

Since the offending version is a *-1 release, the problem is not Ubuntu-
specific. Since, also, Debian has not added any patches that change
source code, the problem is not Debian-specific either. I'll open bugs
with Debian and the libnl folks, and link to them here.

** Attachment added: "Reproducing test program"
   https://bugs.launchpad.net/ubuntu/+source/libnl3/+bug/1312419/+attachment/4277629/+files/netlink-test.c

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libnl3 in Ubuntu.
https://bugs.launchpad.net/bugs/1312419

Title:
  nl_cache_refill; rtnl_neigh_get fail to find neighbors in cache

Status in libnl3 package in Ubuntu:
  Confirmed

Bug description:
  Retrieving information about configured neighbors fail 
  my application is running the following procedure:

  neigh = NULL;
  cache = rtnl_neigh_alloc_cache(sk);
  while(NULL == neigh){
      nl_cache_refill(sk, chache);
      neigh = rtnl_neigh_get(cache, ifindex, dst_addr);
  }

  with libnl3 3.2.21-1 this loop will never end, even when adding a static arp entry.
  However, with libnl-3.2.24 the neighbor lookup succeed.

  additional general info:
  $ lsb_release -rd
  Description:    Ubuntu 14.04 LTS
  Release:        14.04
  $ uname -r
  3.13.0-24-generic
  $ apt-cache policy libnl-genl-3-200 libnl-route-3-200
  libnl-genl-3-200:
    Installed: 3.2.21-1
    Candidate: 3.2.21-1
    Version table:
   *** 3.2.21-1 0
          500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
          100 /var/lib/dpkg/status
  libnl-route-3-200:
    Installed: 3.2.21-1
    Candidate: 3.2.21-1
    Version table:
   *** 3.2.21-1 0
          500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
          100 /var/lib/dpkg/status

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libnl3/+bug/1312419/+subscriptions