summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorHoang Le2019-04-09 09:59:24 +0200
committerGreg Kroah-Hartman2019-04-27 09:36:31 +0200
commit242e5746cb477bdb4c59d0f2d3c5a3e1c0a10629 (patch)
tree1c8b6ec586a9231e9b2776838b72235d74eec459 /net/tipc
parentteam: set slave to promisc if team is already in promisc mode (diff)
downloadkernel-qcow2-linux-242e5746cb477bdb4c59d0f2d3c5a3e1c0a10629.tar.gz
kernel-qcow2-linux-242e5746cb477bdb4c59d0f2d3c5a3e1c0a10629.tar.xz
kernel-qcow2-linux-242e5746cb477bdb4c59d0f2d3c5a3e1c0a10629.zip
tipc: missing entries in name table of publications
[ Upstream commit d1841533e54876f152a30ac398a34f47ad6590b1 ] When binding multiple services with specific type 1Ki, 2Ki.., this leads to some entries in the name table of publications missing when listed out via 'tipc name show'. The problem is at identify zero last_type conditional provided via netlink. The first is initial 'type' when starting name table dummping. The second is continuously with zero type (node state service type). Then, lookup function failure to finding node state service type in next iteration. To solve this, adding more conditional to marked as dirty type and lookup correct service type for the next iteration instead of select the first service as initial 'type' zero. Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/name_table.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 66d5b2c5987a..d72985ca1d55 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -908,7 +908,8 @@ static int tipc_nl_service_list(struct net *net, struct tipc_nl_msg *msg,
for (; i < TIPC_NAMETBL_SIZE; i++) {
head = &tn->nametbl->services[i];
- if (*last_type) {
+ if (*last_type ||
+ (!i && *last_key && (*last_lower == *last_key))) {
service = tipc_service_find(net, *last_type);
if (!service)
return -EPIPE;