• J
    tipc: ensure that idle links are deleted when a bearer is disabled · 169bf912
    Jon Paul Maloy 提交于
    commit afaa3f65
    (tipc: purge links when bearer is disabled) was an attempt to resolve
    a problem that turned out to have a more profound reason.
    
    When we disable a bearer, we delete all its pertaining links if
    there is no other bearer to perform failover to, or if the module
    is shutting down. In case there are dual bearers, we wait with
    deleting links until the failover procedure is finished.
    
    However, this misses the case when a link on the removed bearer
    was already down, so that there will be no failover procedure to
    finish the link delete. This causes confusion if a new bearer is
    added to replace the removed one, and also entails a small memory
    leak.
    
    This commit takes the current state of the link into account when
    deciding when to delete it, and also reverses the above-mentioned
    commit.
    Reviewed-by: NErik Hugne <erik.hugne@ericsson.com>
    Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    169bf912
link.c 65.0 KB