added othernet to CoreInterface to avoid hasattr checks
This commit is contained in:
parent
c580e15f8e
commit
964f78f06a
3 changed files with 4 additions and 3 deletions
|
@ -1086,11 +1086,11 @@ class CoreNetworkBase(NodeBase):
|
|||
for netif in self.netifs(sort=True):
|
||||
if not hasattr(netif, "node"):
|
||||
continue
|
||||
linked_node = netif.node
|
||||
uni = False
|
||||
linked_node = netif.node
|
||||
if linked_node is None:
|
||||
# two layer-2 switches/hubs linked together via linknet()
|
||||
if not hasattr(netif, "othernet"):
|
||||
if not netif.othernet:
|
||||
continue
|
||||
linked_node = netif.othernet
|
||||
if linked_node.id == self.id:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue