link cache fails to get updated when interface added to/removed from bridge
Thomas Haller
thaller at redhat.com
Mon Apr 14 10:11:45 PDT 2014
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20140414/4926cdec/attachment.sig>
More information about the libnl
mailing list