aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorJon Maloy <jon.maloy@ericsson.com>2018-03-29 17:20:43 -0400
committerDavid S. Miller <davem@davemloft.net>2018-03-31 22:19:52 -0400
commit37922ea4a3105176357c8d565a9d982c4a08714a (patch)
tree272bc238297a030a51d0ac23480afbfc1462b2b5 /net/tipc/socket.c
parentf20889f72bd531cad88fbb571755a52cabf43424 (diff)
tipc: permit overlapping service ranges in name table
With the new RB tree structure for service ranges it becomes possible to solve an old problem; - we can now allow overlapping service ranges in the table. When inserting a new service range to the tree, we use 'lower' as primary key, and when necessary 'upper' as secondary key. Since there may now be multiple service ranges matching an indicated 'lower' value, we must also add the 'upper' value to the functions used for removing publications, so that the correct, corresponding range item can be found. These changes guarantee that a well-formed publication/withdrawal item from a peer node never will be rejected, and make it possible to eliminate the problematic backlog functionality we currently have for handling such cases. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 275b666f6231..3e5eba30865e 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -2634,12 +2634,12 @@ static int tipc_sk_withdraw(struct tipc_sock *tsk, uint scope,
2634 if (publ->upper != seq->upper) 2634 if (publ->upper != seq->upper)
2635 break; 2635 break;
2636 tipc_nametbl_withdraw(net, publ->type, publ->lower, 2636 tipc_nametbl_withdraw(net, publ->type, publ->lower,
2637 publ->port, publ->key); 2637 publ->upper, publ->key);
2638 rc = 0; 2638 rc = 0;
2639 break; 2639 break;
2640 } 2640 }
2641 tipc_nametbl_withdraw(net, publ->type, publ->lower, 2641 tipc_nametbl_withdraw(net, publ->type, publ->lower,
2642 publ->port, publ->key); 2642 publ->upper, publ->key);
2643 rc = 0; 2643 rc = 0;
2644 } 2644 }
2645 if (list_empty(&tsk->publications)) 2645 if (list_empty(&tsk->publications))