Subject: bin/5598: mtrace doesn't know about recent protocol and error codes
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Havard.Eidnes@runit.sintef.no>
List: netbsd-bugs
Date: 06/16/1998 21:57:18
>Number:         5598
>Category:       bin
>Synopsis:       mtrace doesn't know about recent protocol and error codes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 16 13:05:01 1998
>Last-Modified:
>Originator:     Havard Eidnes
>Organization:
	RUNIT AS
>Release:        NetBSD 1.3.1
>Environment:
System: NetBSD vader.runit.sintef.no 1.3.1 NetBSD 1.3.1 (VADER) #17: Thu Mar 19 16:03:58 MET 1998 root@vader.runit.sintef.no:/usr/src/sys/arch/i386/compile/VADER i386


>Description:
	mtrace as in 1.3.1 (and NetBSD-current) does not know about the
	new protocol and error codes defined in the current multicast
	traceroute internet draft (draft-ietf-idmr-traceroute-ipm-02.txt).
	It additionally does not know the PIM/BGP4+ protocol code which
	apparently is in use, as shown below.

>How-To-Repeat:
	Inspect the following output:

vader# mtrace 128.223.83.24 129.241.100.134 224.2.186.225
Mtrace from 128.223.83.24 to 129.241.100.134 via group 224.2.186.225
Querying full reverse path... 
  0  vader.runit.sintef.no (129.241.100.134)
 -1  sf-gw.sintef.no (129.241.225.1)  PIM  thresh^ 0  
 -2  sintef-gw.sintef.no (129.241.249.1)  PIM  thresh^ 0  
 -3  trdS-gw.uninett.no (129.241.181.15)  PIM  thresh^ 0  
 -4  osloS-gw.uninett.no (128.39.46.1)  PIM  thresh^ 0  
 -5  no-gw2.nordu.net (128.39.0.141)  DVMRP  thresh^ 0  
 -6  sauce-ether.uio.no (129.240.140.21)  DVMRP  thresh^ 6  
 -7  stockholm.mbone.ebone.net (192.36.148.206)  DVMRP  thresh^ 40  
 -8  schnell.ebone.net (192.36.137.1)  Unknown protocol code 5  thresh^ 64  
 -9  dec3800-1-fddi-0.WestOrange.mci.net (204.70.64.29)  DVMRP  thresh^ 32  
-10  dec3800-2-fddi-1.WestOrange.mci.net (204.70.64.77)  DVMRP  thresh^ 1  
-11  cambridge1-mbone1.bbnplanet.net (199.94.207.2)  Unknown protocol code 5  thresh^ 32  
-12  Loopback0.MB1.BOS1.Alter.Net (137.39.3.65)  Unknown protocol code 8  thresh^ 32  
-13  Loopback0.MB1.DCA1.Alter.Net (137.39.3.91)  Unknown protocol code 8  thresh^ 0  
-14  Loopback0.MB1.EWR1.Alter.Net (137.39.3.92)  Unknown protocol code 8  thresh^ 0  
-15  MBGP-UO.Mbone.Alter.Net (137.39.26.98)  PIM  thresh^ 32  Unknown error code 8
-16  cisco10-gw.uoregon.edu (128.223.3.10)  PIM  thresh^ 0  
-17  rock.uoregon.edu (128.223.83.24)
Round trip time 264 ms

>Fix:

--- /usr/src/usr.sbin/mrouted/prune.h.old	Mon Dec 11 21:57:42 1995
+++ /usr/src/usr.sbin/mrouted/prune.h	Tue Jun 16 21:45:05 1998
@@ -119,14 +119,22 @@
 #define TR_SCOPED	4
 #define TR_NO_RTE	5
 #define TR_NO_FWD	7
+#define TR_RP_OR_CORE	8
+#define TR_RPF_INT	9
+#define TR_NO_MULTICAST	10
 #define TR_NO_SPACE	0x81
 #define TR_OLD_ROUTER	0x82
+#define TR_ADMIN_DENY	0x83
 
 /* fields for tr_rproto (routing protocol) */
 #define PROTO_DVMRP	1
 #define PROTO_MOSPF	2
 #define PROTO_PIM	3
 #define PROTO_CBT	4
+#define PROTO_PIM_SPEC	5
+#define PROTO_PIM_STAT	6
+#define PROTO_DVMRP_STAT 7
+#define PROTO_PIM_MBGP	8
 
 #define MASK_TO_VAL(x, i) { \
 			u_int32_t _x = ntohl(x); \
--- /usr/src/usr.sbin/mtrace/mtrace.c.old	Fri Oct 17 21:22:06 1997
+++ /usr/src/usr.sbin/mtrace/mtrace.c	Tue Jun 16 21:45:19 1998
@@ -239,6 +239,14 @@
 	return ("PIM");
       case PROTO_CBT:
 	return ("CBT");
+      case PROTO_PIM_SPEC:
+	return ("PIM-special");
+      case PROTO_PIM_STAT:
+	return ("PIM-static");
+      case PROTO_DVMRP_STAT:
+	return ("DVMRP-static");
+      case PROTO_PIM_MBGP:
+	return ("PIM/BGP4+");
       default:
 	(void)snprintf(buf, sizeof buf, "Unknown protocol code %d", type);
 	return (buf);
@@ -271,6 +279,14 @@
 	return ("Not forwarding");
       case TR_NO_SPACE:
 	return ("No space in packet");
+      case TR_RP_OR_CORE:
+	return ("RP/Core");
+      case TR_RPF_INT:
+	return ("Trace packet on RPF interface");
+      case TR_NO_MULTICAST:
+	return ("Trace packet on non-MC interface");
+      case TR_ADMIN_DENY:
+	return ("Trace admin-denied");
       default:
 	(void)snprintf(buf, sizeof buf, "Unknown error code %d", type);
 	return (buf);
>Audit-Trail:
>Unformatted: