On Tue, Sep 06, 2016 at 11:31:24AM +0300, Nikolay Aleksandrov wrote:
NAK, this will actually force the iplink slave logic to always lookup the linkutil symbol. Please check iplink.c and how slave linkutil structs are found.
The first part of the “bridge/bond_slave” is extracted from the requested type (e.g. bond_slave -> bond) and is
looked up with the slave flag set to true, in case that fails the symbol (%s_slave_link_util) is looked up and added to the
linkutil list for later use, but in this case we can end up with linkutil list head pointing to itself (the same slave link util added twice if f.e. we have
more than 1 slave of that type) and since it doesn’t match - we’ll loop forever.
Just try adding 2 or more bond slaves with this patch and then do:
ip -d link show
Ohh, my bad. Thanks for the detailed explanation. I will go through the code
and check it again.
Thanks
Hangbin