aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJon Maloy <jon.maloy@ericsson.com>2006-01-10 13:54:24 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-12 17:06:33 -0500
commitb70e4f45a8d8125e4f420c62e71688b8a766689a (patch)
tree2fa8f52ab2665b92008cfc8b88937dda8a7542f5 /net
parent1dba9743337cabacea79e47ed6d709e636c5ed47 (diff)
[TIPC} Fixed bug in disc_timeout()
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Diffstat (limited to 'net')
-rw-r--r--net/tipc/discover.c28
-rw-r--r--net/tipc/netlink.c4
2 files changed, 5 insertions, 27 deletions
diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index c83c1be17f85..73e151cf2a51 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -258,32 +258,8 @@ void disc_update_link_req(struct link_req *req)
258 258
259static void disc_timeout(struct link_req *req) 259static void disc_timeout(struct link_req *req)
260{ 260{
261 struct tipc_msg *msg = buf_msg(req->buf);
262
263 spin_lock_bh(&req->bearer->publ.lock); 261 spin_lock_bh(&req->bearer->publ.lock);
264 262
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:");
287 req->bearer->media->send_msg(req->buf, &req->bearer->publ, &req->dest); 263 req->bearer->media->send_msg(req->buf, &req->bearer->publ, &req->dest);
288 264
289 if ((req->timer_intv == TIPC_LINK_REQ_SLOW) || 265 if ((req->timer_intv == TIPC_LINK_REQ_SLOW) ||
@@ -291,8 +267,8 @@ static void disc_timeout(struct link_req *req)
291 /* leave timer interval "as is" if already at a "normal" rate */ 267 /* leave timer interval "as is" if already at a "normal" rate */
292 } else { 268 } else {
293 req->timer_intv *= 2; 269 req->timer_intv *= 2;
294 if (req->timer_intv > TIPC_LINK_REQ_FAST) 270 if (req->timer_intv > TIPC_LINK_REQ_SLOW)
295 req->timer_intv = TIPC_LINK_REQ_FAST; 271 req->timer_intv = TIPC_LINK_REQ_SLOW;
296 if ((req->timer_intv == TIPC_LINK_REQ_FAST) && 272 if ((req->timer_intv == TIPC_LINK_REQ_FAST) &&
297 (req->bearer->nodes.count)) 273 (req->bearer->nodes.count))
298 req->timer_intv = TIPC_LINK_REQ_SLOW; 274 req->timer_intv = TIPC_LINK_REQ_SLOW;
diff --git a/net/tipc/netlink.c b/net/tipc/netlink.c
index 08b974ed9109..2d778dfc4492 100644
--- a/net/tipc/netlink.c
+++ b/net/tipc/netlink.c
@@ -80,6 +80,8 @@ static int family_registered = 0;
80 80
81int netlink_start(void) 81int netlink_start(void)
82{ 82{
83
84
83 if (genl_register_family(&family)) 85 if (genl_register_family(&family))
84 goto err; 86 goto err;
85 87
@@ -88,7 +90,7 @@ int netlink_start(void)
88 if (genl_register_ops(&family, &ops)) 90 if (genl_register_ops(&family, &ops))
89 goto err_unregister; 91 goto err_unregister;
90 92
91 return 0; 93 return 0;
92 94
93 err_unregister: 95 err_unregister:
94 genl_unregister_family(&family); 96 genl_unregister_family(&family);