diff options
author | David S. Miller <davem@davemloft.net> | 2018-07-20 23:45:10 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-21 06:17:12 +0200 |
commit | c4c5551df136a7c4edd7c2f433d9a296b39826a2 (patch) | |
tree | a33d9f228efd34b0ad18e380385093405ef72d98 /net/tipc/node.c | |
parent | tipc: make link capability update thread safe (diff) | |
parent | Merge tag 'vfio-v4.18-rc6' of git://github.com/awilliam/linux-vfio (diff) | |
download | linux-c4c5551df136a7c4edd7c2f433d9a296b39826a2.tar.xz linux-c4c5551df136a7c4edd7c2f433d9a296b39826a2.zip |
Merge ra.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux
All conflicts were trivial overlapping changes, so reasonably
easy to resolve.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 3819ab14e073..68014f1b6976 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -862,6 +862,7 @@ static u32 tipc_node_suggest_addr(struct net *net, u32 addr) } /* tipc_node_try_addr(): Check if addr can be used by peer, suggest other if not + * Returns suggested address if any, otherwise 0 */ u32 tipc_node_try_addr(struct net *net, u8 *id, u32 addr) { @@ -884,12 +885,14 @@ u32 tipc_node_try_addr(struct net *net, u8 *id, u32 addr) if (n) { addr = n->addr; tipc_node_put(n); + return addr; } - /* Even this node may be in trial phase */ + + /* Even this node may be in conflict */ if (tn->trial_addr == addr) return tipc_node_suggest_addr(net, addr); - return addr; + return 0; } void tipc_node_check_dest(struct net *net, u32 addr, |