link deleted from cache when removed from a bridge

Thomas Graf tgraf at infradead.org
Tue Jun 21 05:31:17 EDT 2011


On Mon, Jun 20, 2011 at 11:24:44AM -0700, Andrew Kraslavsky wrote:
> Everything works great until I remove an interface from a bridge using brctl, e.g.:
> 
> brctl delif br0 eth2
> 
> I then see an unexpected interface deletion event for eth2 as logged by the link_cb callback function and eth2 is removed from the link_cache cache (I can see this when I ask my program to dump the current contents of link cache).
> 
> As an experiment, I added a nl_cache_refill() call to my program when it sees that eth2 has been deleted and verified that eth2 then shows up in the refilled cache.
> 
> My guess is that this deletion event is really just supposed to mean that eth2 is no longer part of bridge br0 but that the event is being taken to mean that eth2 has been deleted from the system.

Yes.

> Is this actually the expected behavior?

No, this is a bug.

> If it helps, I would be _very_ happy to use libnl to manage the bridge through my program.  Meaning, if this problem is occurring because brctl uses ioctl calls and there are libnl calls I can use instead that would avoid the problem, that would be great!
> 

Could you run your program with the NLCB=debug environment variable set and send me
the output which is produced during the brctl delif operation takes places?



More information about the libnl mailing list