Skip to content

Commit b70e4f4

Browse files
Jon MaloyDavid S. Miller
authored andcommitted
[TIPC} Fixed bug in disc_timeout()
Signed-off-by: Jon Maloy <[email protected]>
1 parent 1dba974 commit b70e4f4

File tree

2 files changed

+5
-27
lines changed

2 files changed

+5
-27
lines changed

net/tipc/discover.c

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -258,41 +258,17 @@ void disc_update_link_req(struct link_req *req)
258258

259259
static void disc_timeout(struct link_req *req)
260260
{
261-
struct tipc_msg *msg = buf_msg(req->buf);
262-
263261
spin_lock_bh(&req->bearer->publ.lock);
264262

265-
#if 0
266-
/* CURRENTLY DON'T SUPPORT INTER-ZONE LINKS */
267-
u32 dest_domain = msg_dest_domain(msg);
268-
int stop = 0;
269-
if (!in_scope(dest_domain, tipc_own_addr)) {
270-
struct _zone *z_ptr = zone_find(dest_domain);
271-
272-
if (z_ptr && (z_ptr->links >= msg_req_links(msg)))
273-
stop = 1;
274-
if (req->timer_intv >= 32000)
275-
stop = 1;
276-
}
277-
if (stop) {
278-
k_cancel_timer(&req->timer);
279-
buf_discard(req->buf);
280-
kfree(req);
281-
spin_unlock_bh(&req->bearer->publ.lock);
282-
return;
283-
}
284-
#endif
285-
286-
msg_dbg(msg,"SEND:");
287263
req->bearer->media->send_msg(req->buf, &req->bearer->publ, &req->dest);
288264

289265
if ((req->timer_intv == TIPC_LINK_REQ_SLOW) ||
290266
(req->timer_intv == TIPC_LINK_REQ_FAST)) {
291267
/* leave timer interval "as is" if already at a "normal" rate */
292268
} else {
293269
req->timer_intv *= 2;
294-
if (req->timer_intv > TIPC_LINK_REQ_FAST)
295-
req->timer_intv = TIPC_LINK_REQ_FAST;
270+
if (req->timer_intv > TIPC_LINK_REQ_SLOW)
271+
req->timer_intv = TIPC_LINK_REQ_SLOW;
296272
if ((req->timer_intv == TIPC_LINK_REQ_FAST) &&
297273
(req->bearer->nodes.count))
298274
req->timer_intv = TIPC_LINK_REQ_SLOW;

net/tipc/netlink.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ static int family_registered = 0;
8080

8181
int netlink_start(void)
8282
{
83+
84+
8385
if (genl_register_family(&family))
8486
goto err;
8587

@@ -88,7 +90,7 @@ int netlink_start(void)
8890
if (genl_register_ops(&family, &ops))
8991
goto err_unregister;
9092

91-
return 0;
93+
return 0;
9294

9395
err_unregister:
9496
genl_unregister_family(&family);

0 commit comments

Comments
 (0)