Date: Sun, 12 Sep 2004 04:38:48 +0200 (CEST) From: Dan Lukes <dan@obluda.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/71633: [PATCH] cleanup of the usr.sbin/mrouted code Message-ID: <200409120238.i8C2cmBU007126@kulesh.obluda.cz> Resent-Message-ID: <200409120240.i8C2eXbe087204@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 71633 >Category: bin >Synopsis: [PATCH] cleanup of the usr.sbin/mrouted code >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 12 02:40:33 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Dan Lukes >Release: FreeBSD 5.3-BETA3 i386 >Organization: Obludarium >Environment: System: FreeBSD kulesh.obluda.cz 5.3-BETA3 FreeBSD 5.3-BETA3 #8: Sun Sep 5 07:06:40 CEST 2004 dan@kulesh.obluda.cz:/usr/obj/usr/src/sys/Dan i386 usr.sbin/mrouted/kern.c,v 1.12 1999/08/28 01:17:04 peter usr.sbin/mrouted/main.c,v 1.21 2004/07/11 17:37:33 stefanf usr.sbin/mrouted/route.c,v 1.12 1999/08/28 01:17:08 peter usr.sbin/mrouted/vif.c,v 1.15 1999/08/28 01:17:09 peter usr.sbin/mrouted/prune.c,v 1.18 2000/10/09 06:08:00 kris icmp.c,v 3.8.4.2 1998/01/06 01:57:42 fenner ipip.c,v 3.8.4.6 1998/01/06 01:57:45 fenner usr.sbin/mrouted/rsrr.c,v 1.9 2001/04/17 07:32:37 kris usr.sbin/mrouted/mtrace.c,v 1.21 2004/01/04 16:07:03 charnier >Description: There are more than 5000 warnings issued during "make buildworld". Some of them are false positives, but some of them are sign of true errors. Nobody is upset by warnings due it's amount, so some errors remain uncorrected. I want to cleanup the code-base from warnings, so warnings will become "attention mark" again. usr.sbin/mrouted/common/../kern.c:228: warning: too many arguments for format usr.sbin/mrouted/mrouted/../main.c:755: warning: 'dump' defined but not used usr.sbin/mrouted/mrouted/../route.c:770: warning: unsigned int format, u_long arg (arg 5) usr.sbin/mrouted/mrouted/../route.c:770: warning: unsigned int format, u_long arg (arg 6) usr.sbin/mrouted/mrouted/../route.c:770: warning: unsigned int format, u_long arg (arg 7) usr.sbin/mrouted/mrouted/../route.c:770: warning: unsigned int format, u_long arg (arg 8) usr.sbin/mrouted/mrouted/../route.c:862: warning: int format, long unsigned int arg (arg 5) usr.sbin/mrouted/mrouted/../route.c:1054: warning: suggest explicit braces to avoid ambiguous `else' usr.sbin/mrouted/mrouted/../vif.c:729: warning: int format, u_long arg (arg 6) usr.sbin/mrouted/mrouted/../vif.c:844: warning: int format, u_long arg (arg 5) usr.sbin/mrouted/mrouted/../vif.c:1753: warning: suggest explicit braces to avoid ambiguous `else' usr.sbin/mrouted/mrouted/../prune.c:331: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:548: warning: suggest explicit braces to avoid ambiguous `else' usr.sbin/mrouted/mrouted/../prune.c:818: warning: unsigned int format, pointer arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:818: warning: unsigned int format, pointer arg (arg 7) usr.sbin/mrouted/mrouted/../prune.c:879: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:967: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:1149: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:1170: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:1214: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:1251: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:1344: warning: unsigned int format, vifbitmap_t arg (arg 7) usr.sbin/mrouted/mrouted/../prune.c:1344: warning: unsigned int format, u_long arg (arg 8) usr.sbin/mrouted/mrouted/../prune.c:1344: warning: unsigned int format, u_long arg (arg 9) usr.sbin/mrouted/mrouted/../prune.c:1368: warning: unsigned int format, vifbitmap_t arg (arg 13) usr.sbin/mrouted/mrouted/../prune.c:1411: warning: unsigned int format, u_long arg (arg 4) usr.sbin/mrouted/mrouted/../prune.c:1411: warning: unsigned int format, u_long arg (arg 5) usr.sbin/mrouted/mrouted/../prune.c:1411: warning: unsigned int format, u_long arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:1411: warning: unsigned int format, u_long arg (arg 7) usr.sbin/mrouted/mrouted/../prune.c:1411: warning: unsigned int format, u_long arg (arg 8) usr.sbin/mrouted/mrouted/../prune.c:1411: warning: unsigned int format, u_long arg (arg 9) usr.sbin/mrouted/mrouted/../prune.c:1421: warning: unsigned int format, vifbitmap_t arg (arg 7) usr.sbin/mrouted/mrouted/../prune.c:1493: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:1585: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:1870: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:1874: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:2170: warning: unsigned int format, vifbitmap_t arg (arg 6) usr.sbin/mrouted/mrouted/../prune.c:2373: warning: suggest explicit braces to avoid ambiguous `else' usr.sbin/mrouted/mrouted/../prune.c:2521: warning: suggest explicit braces to avoid ambiguous `else' usr.sbin/mrouted/mrouted/../rsrr.c:346: warning: int format, u_long arg (arg 8) usr.sbin/mrouted/mrouted/../ipip.c:17: warning: 'rcsid' defined but not used usr.sbin/mrouted/mrouted/../icmp.c:16: warning: 'rcsid' defined but not used usr.sbin/mrouted/mrouted/../kern.c:228: warning: too many arguments for format usr.sbin/mrouted/mtrace/../mtrace.c:1974: warning: suggest explicit braces to avoid ambiguous `else' usr.sbin/mrouted/mtrace/../mtrace.c:2041: warning: long unsigned int format, __uint32_t arg (arg 3) usr.sbin/mrouted/mtrace/../mtrace.c:2153: warning: long int format, __uint32_t arg (arg 2) usr.sbin/mrouted/mtrace/../mtrace.c:2153: warning: long int format, __uint32_t arg (arg 3) usr.sbin/mrouted/mtrace/../mtrace.c:2153: warning: long int format, __uint32_t arg (arg 4) usr.sbin/mrouted/mtrace/../mtrace.c:2987: warning: suggest explicit braces to avoid ambiguous `else' >How-To-Repeat: N/A >Fix: *** usr.sbin/mrouted/kern.c.ORIG Sat Aug 28 03:17:04 1999 --- usr.sbin/mrouted/kern.c Sun Sep 12 03:52:07 2004 *************** *** 224,230 **** #ifdef DEBUG_MFC md_log(MD_ADD_FAIL, origin, g->gt_mcastgrp); #endif ! log(LOG_WARNING, errno, "setsockopt MRT_ADD_MFC", inet_fmt(origin, s1), inet_fmt(g->gt_mcastgrp, s2)); } } --- 224,230 ---- #ifdef DEBUG_MFC md_log(MD_ADD_FAIL, origin, g->gt_mcastgrp); #endif ! log(LOG_WARNING, errno, "setsockopt MRT_ADD_MFC of (%s %s)", inet_fmt(origin, s1), inet_fmt(g->gt_mcastgrp, s2)); } } *** usr.sbin/mrouted/main.c.ORIG Sun Aug 8 21:13:25 2004 --- usr.sbin/mrouted/main.c Sun Sep 12 03:54:33 2004 *************** *** 111,117 **** static void final_init __P((void *)); static void fasttimer __P((void *)); static void timer __P((void *)); - static void dump __P((void)); static void dump_version __P((FILE *)); static void fdump __P((void)); static void cdump __P((void)); --- 111,116 ---- *************** *** 750,762 **** /* * Dump internal data structures to stderr. */ - static void - dump() - { - dump_vifs(stderr); - dump_routes(stderr); - } - static void dump_version(fp) FILE *fp; --- 749,754 ---- *** usr.sbin/mrouted/route.c.ORIG Sat Aug 28 03:17:08 1999 --- usr.sbin/mrouted/route.c Sun Sep 12 03:57:24 2004 *************** *** 764,770 **** */ if (!NBRM_SAME(r->rt_subordinates, r->rt_subordadv)) { IF_DEBUG(DEBUG_ROUTE) ! log(LOG_DEBUG, 0, "rt %s sub 0x%08x%08x subadv 0x%08x%08x metric %d", RT_FMT(r, s1), r->rt_subordinates.hi, r->rt_subordinates.lo, r->rt_subordadv.hi, r->rt_subordadv.lo, r->rt_metric); --- 764,770 ---- */ if (!NBRM_SAME(r->rt_subordinates, r->rt_subordadv)) { IF_DEBUG(DEBUG_ROUTE) ! log(LOG_DEBUG, 0, "rt %s sub 0x%08lx%08lx subadv 0x%08lx%08lx metric %d", RT_FMT(r, s1), r->rt_subordinates.hi, r->rt_subordinates.lo, r->rt_subordadv.hi, r->rt_subordadv.lo, r->rt_metric); *************** *** 859,865 **** } else IF_DEBUG(DEBUG_PEER) log(LOG_DEBUG, 0, ! "ignoring probe from non-neighbor %s (%d seconds until next warning)", inet_fmt(src, s1), match->al_ctime + match->al_timer - now); return; } --- 859,865 ---- } else IF_DEBUG(DEBUG_PEER) log(LOG_DEBUG, 0, ! "ignoring probe from non-neighbor %s (%lu seconds until next warning)", inet_fmt(src, s1), match->al_ctime + match->al_timer - now); return; } *************** *** 1051,1064 **** return; } ! if (uvifs[vifi].uv_flags & VIFF_BLASTER) if (datalen > 0) { queue_blaster_report(vifi, src, dst, p, datalen, level); return; } else { datalen = -datalen; } ! if (!(nbr = update_neighbor(vifi, src, DVMRP_REPORT, NULL, 0, level))) return; --- 1051,1065 ---- return; } ! if (uvifs[vifi].uv_flags & VIFF_BLASTER) { if (datalen > 0) { queue_blaster_report(vifi, src, dst, p, datalen, level); return; } else { datalen = -datalen; } ! } ! if (!(nbr = update_neighbor(vifi, src, DVMRP_REPORT, NULL, 0, level))) return; *** usr.sbin/mrouted/vif.c.ORIG Sat Aug 28 03:17:09 1999 --- usr.sbin/mrouted/vif.c Sun Sep 12 03:59:42 2004 *************** *** 725,731 **** g->al_timerid = SetTimer(vifi, g); IF_DEBUG(DEBUG_IGMP) log(LOG_DEBUG, 0, ! "timer for grp %s on vif %d set to %d", inet_fmt(group, s2), vifi, g->al_timer); break; } --- 725,731 ---- g->al_timerid = SetTimer(vifi, g); IF_DEBUG(DEBUG_IGMP) log(LOG_DEBUG, 0, ! "timer for grp %s on vif %d set to %lu", inet_fmt(group, s2), vifi, g->al_timer); break; } *************** *** 840,846 **** if (group == g->al_addr) { IF_DEBUG(DEBUG_IGMP) log(LOG_DEBUG, 0, ! "[vif.c, _accept_leave_message] %d %d \n", g->al_old, g->al_query); /* Ignore the leave message if there are old hosts present */ --- 840,846 ---- if (group == g->al_addr) { IF_DEBUG(DEBUG_IGMP) log(LOG_DEBUG, 0, ! "[vif.c, _accept_leave_message] %d %lu \n", g->al_old, g->al_query); /* Ignore the leave message if there are old hosts present */ *************** *** 1750,1756 **** v->uv_prune_lifetime); v_req.vifi = vifi; ! if (did_final_init) if (ioctl(udp_socket, SIOCGETVIFCNT, (char *)&v_req) < 0) { log(LOG_WARNING, errno, "SIOCGETVIFCNT fails on vif %d", vifi); --- 1750,1756 ---- v->uv_prune_lifetime); v_req.vifi = vifi; ! if (did_final_init) { if (ioctl(udp_socket, SIOCGETVIFCNT, (char *)&v_req) < 0) { log(LOG_WARNING, errno, "SIOCGETVIFCNT fails on vif %d", vifi); *************** *** 1760,1765 **** --- 1760,1766 ---- fprintf(fp, " pkts/bytes out: %lu/%lu\n", v_req.ocount, v_req.obytes); } + } fprintf(fp, "\n"); } fprintf(fp, "\n"); *** usr.sbin/mrouted/prune.c.ORIG Mon Oct 9 08:08:00 2000 --- usr.sbin/mrouted/prune.c Sun Sep 12 04:14:07 2004 *************** *** 326,332 **** /* Make sure we're still not forwarding traffic */ if (!VIFM_ISEMPTY(gt->gt_grpmems)) { IF_DEBUG(DEBUG_PRUNE) ! log(LOG_DEBUG, 0, "rexmit_prune (%s %s): gm:%x", RT_FMT(gt->gt_route, s1), inet_fmt(gt->gt_mcastgrp, s2), gt->gt_grpmems); return; --- 326,332 ---- /* Make sure we're still not forwarding traffic */ if (!VIFM_ISEMPTY(gt->gt_grpmems)) { IF_DEBUG(DEBUG_PRUNE) ! log(LOG_DEBUG, 0, "rexmit_prune (%s %s): gm:%lx", RT_FMT(gt->gt_route, s1), inet_fmt(gt->gt_mcastgrp, s2), gt->gt_grpmems); return; *************** *** 545,557 **** send_on_vif(&uvifs[vifi], dst, DVMRP_GRAFT_ACK, datalen); } ! IF_DEBUG(DEBUG_PRUNE) if (vifi == NO_VIF) log(LOG_DEBUG, 0, "sent graft ack for (%s, %s) to %s", inet_fmt(origin, s1), inet_fmt(grp, s2), inet_fmt(dst, s3)); else log(LOG_DEBUG, 0, "sent graft ack for (%s, %s) to %s on vif %d", inet_fmt(origin, s1), inet_fmt(grp, s2), inet_fmt(dst, s3), vifi); } /* --- 545,558 ---- send_on_vif(&uvifs[vifi], dst, DVMRP_GRAFT_ACK, datalen); } ! IF_DEBUG(DEBUG_PRUNE) { if (vifi == NO_VIF) log(LOG_DEBUG, 0, "sent graft ack for (%s, %s) to %s", inet_fmt(origin, s1), inet_fmt(grp, s2), inet_fmt(dst, s3)); else log(LOG_DEBUG, 0, "sent graft ack for (%s, %s) to %s on vif %d", inet_fmt(origin, s1), inet_fmt(grp, s2), inet_fmt(dst, s3), vifi); + } } /* *************** *** 813,819 **** struct gtable *g; g = gtp ? gtp->gt_gnext : kernel_table; ! log(LOG_WARNING, 0, "Entry for (%s %s) (rt:%x) exists (rt:%x)", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), r, g->gt_route); } else { --- 814,820 ---- struct gtable *g; g = gtp ? gtp->gt_gnext : kernel_table; ! log(LOG_WARNING, 0, "Entry for (%s %s) (rt:%p) exists (rt:%p)", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), r, g->gt_route); } else { *************** *** 873,879 **** k_add_rg(origin, gt); IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "add cache entry (%s %s) gm:%x, parent-vif:%d", inet_fmt(origin, s1), inet_fmt(mcastgrp, s2), gt->gt_grpmems, r ? r->rt_parent : -1); --- 874,880 ---- k_add_rg(origin, gt); IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "add cache entry (%s %s) gm:%lx, parent-vif:%d", inet_fmt(origin, s1), inet_fmt(mcastgrp, s2), gt->gt_grpmems, r ? r->rt_parent : -1); *************** *** 962,968 **** send_graft(g); IF_DEBUG(DEBUG_PEER) ! log(LOG_DEBUG, 0, "reset neighbor state (%s %s) gm:%x", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); } --- 963,969 ---- send_graft(g); IF_DEBUG(DEBUG_PEER) ! log(LOG_DEBUG, 0, "reset neighbor state (%s %s) gm:%lx", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); } *************** *** 1144,1150 **** } IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "updating cache entries (%s %s) old gm:%x", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); --- 1145,1151 ---- } IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "updating cache entries (%s %s) old gm:%lx", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); *************** *** 1165,1171 **** send_prune_or_graft(g); IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "updating cache entries (%s %s) new gm:%x", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); --- 1166,1172 ---- send_prune_or_graft(g); IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "updating cache entries (%s %s) new gm:%lx", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); *************** *** 1209,1215 **** prun_add_ttls(g); IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "update lclgrp (%s %s) gm:%x", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); --- 1210,1216 ---- prun_add_ttls(g); IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "update lclgrp (%s %s) gm:%lx", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); *************** *** 1246,1252 **** uvifs[vifi].uv_nbrmap, g->gt_prunes)) { VIFM_CLR(vifi, g->gt_grpmems); IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "delete lclgrp (%s %s) gm:%x", RT_FMT(g->gt_route, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); --- 1247,1253 ---- uvifs[vifi].uv_nbrmap, g->gt_prunes)) { VIFM_CLR(vifi, g->gt_grpmems); IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "delete lclgrp (%s %s) gm:%lx", RT_FMT(g->gt_route, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); *************** *** 1339,1345 **** r = g->gt_route; IF_DEBUG(DEBUG_PRUNE) ! log(LOG_DEBUG, 0, "found grp state, (%s %s), metric is %d, children are %x, subords are %08x%08x", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), r->rt_metric, r->rt_children, r->rt_subordinates.hi, r->rt_subordinates.lo); if (!VIFM_ISSET(vifi, r->rt_children)) { --- 1340,1346 ---- r = g->gt_route; IF_DEBUG(DEBUG_PRUNE) ! log(LOG_DEBUG, 0, "found grp state, (%s %s), metric is %d, children are %lx, subords are %08lx%08lx", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), r->rt_metric, r->rt_children, r->rt_subordinates.hi, r->rt_subordinates.lo); if (!VIFM_ISSET(vifi, r->rt_children)) { *************** *** 1361,1367 **** } if ((pt = find_prune_entry(src, g->gt_pruntbl)) != NULL) { IF_DEBUG(DEBUG_PRUNE) ! log(LOG_DEBUG, 0, "%s %d from %s for (%s %s)/%d %s %d %s %x", "duplicate prune received on vif", vifi, inet_fmt(src, s1), inet_fmt(prun_src, s2), inet_fmt(prun_grp, s3), prun_tmr, --- 1362,1368 ---- } if ((pt = find_prune_entry(src, g->gt_pruntbl)) != NULL) { IF_DEBUG(DEBUG_PRUNE) ! log(LOG_DEBUG, 0, "%s %d from %s for (%s %s)/%d %s %d %s %lx", "duplicate prune received on vif", vifi, inet_fmt(src, s1), inet_fmt(prun_src, s2), inet_fmt(prun_grp, s3), prun_tmr, *************** *** 1405,1411 **** VIFM_CLR(vifi, g->gt_grpmems); IF_DEBUG(DEBUG_PRUNE) ! log(LOG_DEBUG, 0, "vifnbrs=0x%08x%08x, subord=0x%08x%08x prunes=0x%08x%08x", uvifs[vifi].uv_nbrmap.hi,uvifs[vifi].uv_nbrmap.lo, r->rt_subordinates.hi, r->rt_subordinates.lo, g->gt_prunes.hi, g->gt_prunes.lo); --- 1406,1412 ---- VIFM_CLR(vifi, g->gt_grpmems); IF_DEBUG(DEBUG_PRUNE) ! log(LOG_DEBUG, 0, "vifnbrs=0x%08lx%08lx, subord=0x%08lx%08lx prunes=0x%08lx%08lx", uvifs[vifi].uv_nbrmap.hi,uvifs[vifi].uv_nbrmap.lo, r->rt_subordinates.hi, r->rt_subordinates.lo, g->gt_prunes.hi, g->gt_prunes.lo); *************** *** 1416,1422 **** log(LOG_WARNING, 0, "subordinate error"); /* XXX end debugging */ IF_DEBUG(DEBUG_PRUNE|DEBUG_CACHE) ! log(LOG_DEBUG, 0, "prune (%s %s), stop sending on vif %d, gm:%x", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), vifi, g->gt_grpmems); --- 1417,1423 ---- log(LOG_WARNING, 0, "subordinate error"); /* XXX end debugging */ IF_DEBUG(DEBUG_PRUNE|DEBUG_CACHE) ! log(LOG_DEBUG, 0, "prune (%s %s), stop sending on vif %d, gm:%lx", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), vifi, g->gt_grpmems); *************** *** 1488,1494 **** g->gt_timer = CACHE_LIFETIME(cache_lifetime); IF_DEBUG(DEBUG_PRUNE|DEBUG_CACHE) ! log(LOG_DEBUG, 0, "chkgrp graft (%s %s) gm:%x", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); --- 1489,1495 ---- g->gt_timer = CACHE_LIFETIME(cache_lifetime); IF_DEBUG(DEBUG_PRUNE|DEBUG_CACHE) ! log(LOG_DEBUG, 0, "chkgrp graft (%s %s) gm:%lx", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); *************** *** 1580,1586 **** VIFM_SET(vifi, g->gt_grpmems); IF_DEBUG(DEBUG_PRUNE|DEBUG_CACHE) ! log(LOG_DEBUG, 0, "accept graft (%s %s) gm:%x", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); --- 1581,1587 ---- VIFM_SET(vifi, g->gt_grpmems); IF_DEBUG(DEBUG_PRUNE|DEBUG_CACHE) ! log(LOG_DEBUG, 0, "accept graft (%s %s) gm:%lx", RT_FMT(r, s1), inet_fmt(g->gt_mcastgrp, s2), g->gt_grpmems); *************** *** 1866,1876 **** } } if (fixit) { ! log(LOG_WARNING, 0, "fixing membership for (%s %s) gm:%x", RT_FMT(r, s1), inet_fmt(gt->gt_mcastgrp, s2), gt->gt_grpmems); determine_forwvifs(gt); send_prune_or_graft(gt); ! log(LOG_WARNING, 0, "fixed membership for (%s %s) gm:%x", RT_FMT(r, s1), inet_fmt(gt->gt_mcastgrp, s2), gt->gt_grpmems); #ifdef RINGBUFFER printringbuf(); --- 1867,1877 ---- } } if (fixit) { ! log(LOG_WARNING, 0, "fixing membership for (%s %s) gm:%lx", RT_FMT(r, s1), inet_fmt(gt->gt_mcastgrp, s2), gt->gt_grpmems); determine_forwvifs(gt); send_prune_or_graft(gt); ! log(LOG_WARNING, 0, "fixed membership for (%s %s) gm:%lx", RT_FMT(r, s1), inet_fmt(gt->gt_mcastgrp, s2), gt->gt_grpmems); #ifdef RINGBUFFER printringbuf(); *************** *** 2165,2171 **** struct rtentry *rt = gt->gt_route; VIFM_SET(vifi, gt->gt_grpmems); IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "forw again (%s %s) gm:%x vif:%d", RT_FMT(rt, s1), inet_fmt(gt->gt_mcastgrp, s2), gt->gt_grpmems, vifi); --- 2166,2172 ---- struct rtentry *rt = gt->gt_route; VIFM_SET(vifi, gt->gt_grpmems); IF_DEBUG(DEBUG_CACHE) ! log(LOG_DEBUG, 0, "forw again (%s %s) gm:%lx vif:%d", RT_FMT(rt, s1), inet_fmt(gt->gt_mcastgrp, s2), gt->gt_grpmems, vifi); *************** *** 2370,2384 **** /* determine the routing table entry for this traceroute */ rt = determine_route(qry->tr_src); ! IF_DEBUG(DEBUG_TRACE) ! if (rt) { ! log(LOG_DEBUG, 0, "rt parent vif: %d rtr: %s metric: %d", rt->rt_parent, inet_fmt(rt->rt_gateway, s1), rt->rt_metric); ! log(LOG_DEBUG, 0, "rt origin %s", RT_FMT(rt, s1)); ! } else ! log(LOG_DEBUG, 0, "...no route"); ! /* * Query type packet - check if rte exists * Check if the query destination is a vif connected to me. --- 2371,2386 ---- /* determine the routing table entry for this traceroute */ rt = determine_route(qry->tr_src); ! IF_DEBUG(DEBUG_TRACE) { ! if (rt) { ! log(LOG_DEBUG, 0, "rt parent vif: %d rtr: %s metric: %d", rt->rt_parent, inet_fmt(rt->rt_gateway, s1), rt->rt_metric); ! log(LOG_DEBUG, 0, "rt origin %s", RT_FMT(rt, s1)); ! } else ! log(LOG_DEBUG, 0, "...no route"); ! } ! /* * Query type packet - check if rte exists * Check if the query destination is a vif connected to me. *************** *** 2518,2530 **** resp->tr_rflags = TR_SCOPED; else if (gt->gt_prsent_timer) resp->tr_rflags = TR_PRUNED; ! else if (!VIFM_ISSET(vifi, gt->gt_grpmems)) if (!NBRM_ISEMPTY(uvifs[vifi].uv_nbrmap) && SUBS_ARE_PRUNED(rt->rt_subordinates, uvifs[vifi].uv_nbrmap, gt->gt_prunes)) resp->tr_rflags = TR_OPRUNED; else resp->tr_rflags = TR_NO_FWD; } else { if ((vifi != NO_VIF && scoped_addr(vifi, group)) || (rt && scoped_addr(rt->rt_parent, group))) --- 2520,2533 ---- resp->tr_rflags = TR_SCOPED; else if (gt->gt_prsent_timer) resp->tr_rflags = TR_PRUNED; ! else if (!VIFM_ISSET(vifi, gt->gt_grpmems)) { if (!NBRM_ISEMPTY(uvifs[vifi].uv_nbrmap) && SUBS_ARE_PRUNED(rt->rt_subordinates, uvifs[vifi].uv_nbrmap, gt->gt_prunes)) resp->tr_rflags = TR_OPRUNED; else resp->tr_rflags = TR_NO_FWD; + } } else { if ((vifi != NO_VIF && scoped_addr(vifi, group)) || (rt && scoped_addr(rt->rt_parent, group))) *** usr.sbin/mrouted/rsrr.c.ORIG Tue Apr 17 09:32:37 2001 --- usr.sbin/mrouted/rsrr.c Sun Sep 12 04:20:28 2004 *************** *** 339,345 **** } IF_DEBUG(DEBUG_RSRR) ! log(LOG_DEBUG, 0, "%sSend RSRR Route Reply for src %s dst %s in vif %d out vif %d\n", gt_notify ? "Route Change: " : "", inet_fmt(route_reply->source_addr.s_addr,s1), inet_fmt(route_reply->dest_addr.s_addr,s2), --- 339,345 ---- } IF_DEBUG(DEBUG_RSRR) ! log(LOG_DEBUG, 0, "%sSend RSRR Route Reply for src %s dst %s in vif %d out vif %lu\n", gt_notify ? "Route Change: " : "", inet_fmt(route_reply->source_addr.s_addr,s1), inet_fmt(route_reply->dest_addr.s_addr,s2), *** usr.sbin/mrouted/ipip.c.ORIG Wed Jan 20 08:44:11 1999 --- usr.sbin/mrouted/ipip.c Sun Sep 12 04:23:45 2004 *************** *** 13,22 **** #include "defs.h" ! #ifndef lint ! static char rcsid[] = "@(#) $Id: \ ! ipip.c,v 3.8.4.6 1998/01/06 01:57:45 fenner Exp $"; ! #endif /* * Exported variables. --- 13,20 ---- #include "defs.h" ! #include <sys/cdefs.h> ! __FBSDID("$Id: ipip.c,v 3.8.4.6 1998/01/06 01:57:45 fenner Exp $"); /* * Exported variables. *** usr.sbin/mrouted/icmp.c.ORIG Wed Jan 20 08:44:10 1999 --- usr.sbin/mrouted/icmp.c Sun Sep 12 04:24:56 2004 *************** *** 12,21 **** #include "defs.h" ! #ifndef lint ! static char rcsid[] = "@(#) $Id: \ ! icmp.c,v 3.8.4.2 1998/01/06 01:57:42 fenner Exp $"; ! #endif static int icmp_socket; --- 12,19 ---- #include "defs.h" ! #include <sys/cdefs.h> ! __FBSDID("$Id: icmp.c,v 3.8.4.2 1998/01/06 01:57:42 fenner Exp $"); static int icmp_socket; *** usr.sbin/mrouted/mtrace.c.ORIG Mon Jan 5 19:51:29 2004 --- usr.sbin/mrouted/mtrace.c Sun Sep 12 04:29:39 2004 *************** *** 1971,1982 **** break; case NEITHER: ! if (ghave != NEITHER) if (tunstats) printf(" "); else printf(" "); ! break; } --- 1971,1983 ---- break; case NEITHER: ! if (ghave != NEITHER) { if (tunstats) printf(" "); else printf(" "); ! } ! break; } *************** *** 2038,2044 **** (long)(ntohl(s->tr_vifout) - ntohl(r->tr_vifout))); printf("pkts: %ld ", (long)(ntohl(s->tr_pktcnt) - ntohl(r->tr_pktcnt))); printf("time: %d\n", timediff); ! printf("\t\t\t\treset: %x hoptime: %lx\n", *rst, ntohl(s->tr_qarr)); } } --- 2039,2045 ---- (long)(ntohl(s->tr_vifout) - ntohl(r->tr_vifout))); printf("pkts: %ld ", (long)(ntohl(s->tr_pktcnt) - ntohl(r->tr_pktcnt))); printf("time: %d\n", timediff); ! printf("\t\t\t\treset: %x hoptime: %lx\n", *rst, (unsigned long)ntohl(s->tr_qarr)); } } *************** *** 2149,2156 **** if (debug > 2) { printf("\t\tip=%s, r=%d, res=%d\n", inet_fmt(b->tr_inaddr, s1), *r, res); if (res) ! printf("\t\tbase=%ld, prev=%ld, new=%ld\n", ntohl(b->tr_pktcnt), ! ntohl(p->tr_pktcnt), ntohl(n->tr_pktcnt)); } if (*r & BUG_RESET) { if (res || (*r & BUG_RESET2X)) { --- 2150,2159 ---- if (debug > 2) { printf("\t\tip=%s, r=%d, res=%d\n", inet_fmt(b->tr_inaddr, s1), *r, res); if (res) ! printf("\t\tbase=%ld, prev=%ld, new=%ld\n", ! (unsigned long)ntohl(b->tr_pktcnt), ! (unsigned long)ntohl(p->tr_pktcnt), ! (unsigned long)ntohl(n->tr_pktcnt)); } if (*r & BUG_RESET) { if (res || (*r & BUG_RESET2X)) { *************** *** 2984,2990 **** if (base.rtime == 0) { printf("Timed out receiving responses\n"); ! if (IN_MULTICAST(ntohl(tdst))) if (tdst == query_cast) printf("Perhaps no local router has a route for source %s\n", inet_fmt(qsrc, s1)); --- 2987,2993 ---- if (base.rtime == 0) { printf("Timed out receiving responses\n"); ! if (IN_MULTICAST(ntohl(tdst))) { if (tdst == query_cast) printf("Perhaps no local router has a route for source %s\n", inet_fmt(qsrc, s1)); *************** *** 2994,2999 **** --- 2997,3003 ---- or multicast at ttl %d doesn't reach its last-hop router for that source\n", inet_fmt(qdst, s2), inet_fmt(qgrp, s3), inet_fmt(qsrc, s1), qttl ? qttl : MULTICAST_TTL1); + } exit(1); } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409120238.i8C2cmBU007126>