libnl-3 neighbor cache - rtnl_neigh_alloc_cache called for multicast address

226 views Asked by At

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.

___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);
=========================

0

There are 0 answers