link cache fails to get updated when interface added to/removed from bridge
David Mosberger
davidm at egauge.net
Mon Apr 14 13:50:51 PDT 2014
OK, this is confirmed: after updating my embedded platform to v3.2.24
of libnl, everything works as expected.
--david
On Mon, Apr 14, 2014 at 2:40 PM, David Mosberger <davidm at egauge.net> wrote:
> Thomas,
>
> Is it possible you have a newer version of libnl installed? If so, I
> think you'd have to run the program with:
>
> LD_LIBRARY_PATH=lib/.libs ./a.out
>
> to ensure the test-library gets used.
>
> For what it's worth: I tried on an x86-64 system using the GIT tree:
> with v3.2.11, I see the same broken behavior. With the latest GIT
> tree (version.h is 3.2.24), my test program works fine.
>
> Perhaps I should just upgrade the embedded system to 3.2.24.
>
> --david
>
> On Mon, Apr 14, 2014 at 12:25 PM, David Mosberger <davidm at egauge.net> wrote:
>> 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
>
>
>
> --
> eGauge Systems LLC, http://egauge.net/, 1.877-EGAUGE1, fax 720.545.9768
--
eGauge Systems LLC, http://egauge.net/, 1.877-EGAUGE1, fax 720.545.9768
More information about the libnl
mailing list