netlink notification for veth interface/ipaddress not working
Jef Oliver
jef at eljef.me
Wed Jan 4 15:58:11 PST 2017
On Wed, Jan 4, 2017 at 3:40 PM, Devanath S <s.devanath at gmail.com> wrote:
> Hi *,
>
> I am running OSPF protocol on the linux box and "ip neighbor show "
> lists the below hosts connected to it.
>
> 10.11.15.185 dev eth0 lladdr 52:54:00:48:d1:89 STALE
> 172.31.2.100 dev veth5 lladdr 00:02:00:00:00:01 STALE
> 10.11.0.1 dev eth0 lladdr c0:ea:e4:e3:ed:52 DELAY
> 10.0.0.1 dev veth6 lladdr b6:ca:96:99:bb:b7 STALE
> 10.11.1.141 dev eth0 lladdr 08:00:27:0e:10:54 REACHABLE
>
> Problem:
> My app uses libnl neighor cache apis as below to list the neighbors.
> Problem is its getting called for multicast address like
> "224.0.0.5/224.0.0.22/224.0.0.251" aswell, even though there are no
> neighbor entries. Not sure why is this? Is there a way to avoid it,
> Please suggest.
The entries are still there. However, "ip neigh show" is filtering them.
The associated functionality in iproute2 is here:
http://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/tree/ip/ipneigh.c#n194
I hope this helps a little.
Jef
> ___code snippet______
> ======creation========
>
> err = rtnl_neigh_alloc_cache(sock, &ht_cache);
> if (err < 0) {
> throw "problem with the neigh cache!";
> }
> err = nl_cache_mngr_add_cache(mngr, ht_cache, &HTCb, this);
> if (err < 0) {
> throw "problem adding neigh cache!";
> }
> =========================
> =============read individual entry=====
> nl_cache_foreach(ht_cache, &HTIterCb, this);
> =========================
>
> ------------------------------------------------------
>
> Regards,
> Dev
>
> _______________________________________________
> libnl mailing list
> libnl at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libnl
More information about the libnl
mailing list