From 10f5c47d2e3d9fdeb2dd4ade1d09a1e06b53a7f6 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Thu, 11 May 2000 09:41:16 +0000 Subject: [PATCH] Some more paranoia into rip_insert and rip_delete --- proto/rip/rip.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/proto/rip/rip.c b/proto/rip/rip.c index 38a843da..b277f5c2 100644 --- a/proto/rip/rip.c +++ b/proto/rip/rip.c @@ -447,7 +447,11 @@ rip_timer(timer *t) rte *rte; rte = SKIP_BACK( struct rte, u.rip.garbage, e ); #ifdef LOCAL_DEBUG - DBG( "Garbage: " ); rte_dump( rte ); + { + struct proto *p = rte->attrs->proto; + CHK_MAGIC; + } + DBG( "Garbage: (%p)", rte ); rte_dump( rte ); #endif if (now - rte->u.rip.lastmodX > P_CF->timeout_time) { @@ -815,6 +819,8 @@ static void rip_rte_insert(net *net, rte *rte) { struct proto *p = rte->attrs->proto; + CHK_MAGIC; + DBG( "rip_rte_insert: %p\n", rte ); rte->u.rip.lastmodX = now; add_head( &P->garbage, &rte->u.rip.garbage ); } @@ -822,6 +828,9 @@ rip_rte_insert(net *net, rte *rte) static void rip_rte_remove(net *net, rte *rte) { + struct proto *p = rte->attrs->proto; + CHK_MAGIC; + DBG( "rip_rte_remove: %p\n", rte ); rem_node( &rte->u.rip.garbage ); }