tipc: fix bug in function tipc_nl_node_dump_monitor
authorJon Maloy <jon.maloy@ericsson.com>
Wed, 25 Apr 2018 16:29:25 +0000 (18:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Apr 2018 15:03:56 +0000 (11:03 -0400)
Commit 36a50a989ee8 ("tipc: fix infinite loop when dumping link monitor
summary") intended to fix a problem with user tool looping when max
number of bearers are enabled.

Unfortunately, the wrong version of the commit was posted, so the
problem was not solved at all.

This commit adds the missing part.

Fixes: 36a50a989ee8 ("tipc: fix infinite loop when dumping link monitor summary")
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/node.c

index 6f98b56dd48ece2cbedb19d6e44fd9c55488e7a9..baaf93f12cbd0de5b4ce002ac0bcbc818f7d03ac 100644 (file)
@@ -2244,7 +2244,7 @@ int tipc_nl_node_dump_monitor(struct sk_buff *skb, struct netlink_callback *cb)
 
        rtnl_lock();
        for (bearer_id = prev_bearer; bearer_id < MAX_BEARERS; bearer_id++) {
-               err = __tipc_nl_add_monitor(net, &msg, prev_bearer);
+               err = __tipc_nl_add_monitor(net, &msg, bearer_id);
                if (err)
                        break;
        }