link cache fails to get updated when interface added to/removed from bridge

David Mosberger davidm at egauge.net
Mon Apr 14 11:25:08 PDT 2014


Thomas,

Thanks for your response.
Your output is what I'd love to see.  Did you use brctl addif/delif to
add/remove devices from the bridge?
  --david

On Mon, Apr 14, 2014 at 11:11 AM, Thomas Haller <thaller at redhat.com> wrote:
> On Thu, 2014-04-03 at 23:04 -0600, David Mosberger wrote:
>> I'm trying to use libnl-3 v3.2.11 to track the interfaces that are
>> part of a bridge.
>> I can read the initial state fine but updates don't seem to get reflected in the
>> cache.  I attached a short test-program.
>>
>> The test-program assumes a bridge called br0 exists.  show_bridge() is
>> supposed to list all the interfaces part of the bridge.  On startup, the correct
>> list is printed.  However, when I add/remove an interface to/from the bridge
>> with brctl addif br0 eth0/brctl delif br0 eth0, respectively, the cache doesn't
>> get updated, even though I do see route/link::new and route/link:del
>> messages coming from the kernel.
>>
>> Is there a bug in my program?
>
>
> Hi David,
>
>
> sorry for the late reply.
>
> Your program seems to work for me:
>
>
> ~/libnl ((libnl3_2_11) +)$ gcc -Iinclude/ -Llib/.libs/ -lnl-route-3 -lnl-3 a.c
> ~/libnl ((libnl3_2_11) +)$ ./a.out
> Failed to read classid file: Object not found
> br0: dummy0 dummy1
> cache manager got update
> br0: dummy0 dummy1
> cache manager got update
> br0: dummy0
> cache manager got update
> br0: dummy0
> cache manager got update
> br0:
> cache manager got update
> br0:
> cache manager got update
> br0: dummy0
> cache manager got update
> br0: dummy0
> cache manager got update
> br0: dummy0 dummy1
> cache manager got update
> br0: dummy0 dummy1
>
>
>
>
> I am not sure, what you expect to see.
>
> Thomas



-- 
eGauge Systems LLC, http://egauge.net/, 1.877-EGAUGE1, fax 720.545.9768



More information about the libnl mailing list