ports/89312: Patch fixes to bugs in net/mtr

Mark Knight markk at knigma.org
Sun Nov 20 12:30:36 UTC 2005


>Number:         89312
>Category:       ports
>Synopsis:       Patch fixes to bugs in net/mtr
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 20 12:30:34 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Mark Knight
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD shrewd.pub.knigma.org 6.0-STABLE FreeBSD 6.0-STABLE #0: Wed Nov 16 08:03:51 GMT 2005 root at shrewd.pub.knigma.org:/usr/src/sys/i386/compile/SHREWD i386

>Description:

Since upgrading to mtr-0.69, I've been getting duplicate entries for 
multi-path routers.  This first bug affects 5.4 and 6.0:

  <http://www.bitwizard.nl/cgi-bin/mtr/incoming?id=2506>

There's also a bug in the IPv6 handling that affects FreeBSD 6.0
(fix found by Hajimu UMEMOTO).

>How-To-Repeat:

Use mtr on a 6.0-STABLE system.

>Fix:

The following patch fixes both of these issues:

Index: patch-net.c
===================================================================
RCS file: /home/ncvs/ports/net/mtr/files/patch-net.c,v
retrieving revision 1.1
diff -u -r1.1 patch-net.c
--- patch-net.c	29 Oct 2004 22:31:02 -0000	1.1
+++ patch-net.c	16 Nov 2005 19:43:15 -0000
@@ -1,10 +1,28 @@
---- net.c.orig	Wed Aug 25 09:21:27 2004
-+++ net.c	Tue Oct 26 12:46:58 2004
-@@ -249,7 +249,6 @@
+--- net.c.orig	Thu Jan 13 08:13:53 2005
++++ net.c	Wed Nov 16 19:43:05 2005
+@@ -277,7 +277,7 @@
+       exit( EXIT_FAILURE);
+     }
+     echotype = ICMP6_ECHO_REQUEST;
+-    salen = sizeof (struct sockaddr_storage);
++    salen = sizeof (struct sockaddr_in6);
+     break;
+ #endif
+   }
+@@ -305,7 +305,6 @@
      rv = sendto(sendsock, packet, abs(packetsize), 0, 
- 		(struct sockaddr *)&remoteaddress, sizeof(remoteaddress));
+ 		remotesockaddr, salen);
      if (rv >= 0) {
 -      fprintf (stderr, "You've got a broken (FreeBSD?) system\n");
        BSDfix = 1;
      }
    }
+@@ -346,7 +345,7 @@
+     addrcpy( (void *) &(host[index].addrs[0]), addr, af );
+   } else {
+     for( i=0; i<MAXPATH; ) {
+-      if( addrcmp( (void *) &(host[index].addrs[i]), (void *) &addr,
++      if( addrcmp( (void *) &(host[index].addrs[i]), addr,
+                    af ) == 0 ||
+           addrcmp( (void *) &(host[index].addrs[i]),
+ 		   (void *) &unspec_addr, af ) == 0 ) break;

This patch can also be downloaded here:

  <http://www.knigma.org.uk/scratch/patch-net.c.txt>

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list