From nobody@FreeBSD.org  Thu Jun  9 18:35:18 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4AAB21065672
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  9 Jun 2011 18:35:18 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B4218FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  9 Jun 2011 18:35:18 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p59IZGU7093876
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 9 Jun 2011 18:35:16 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p59IZG7l093875;
	Thu, 9 Jun 2011 18:35:16 GMT
	(envelope-from nobody)
Message-Id: <201106091835.p59IZG7l093875@red.freebsd.org>
Date: Thu, 9 Jun 2011 18:35:16 GMT
From: Igor <freebsd@str.komkon.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: traceroute doesn't allow long host names
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         157732
>Category:       bin
>Synopsis:       traceroute(8) doesn't allow long host names
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 09 18:40:08 UTC 2011
>Closed-Date:    Wed Jun 29 19:57:15 UTC 2011
>Last-Modified:  Wed Jun 29 19:57:15 UTC 2011
>Originator:     Igor
>Release:        7.3-RELEASE-p2 FreeBSD 7.3-RELEASE-p2 #0: Mon Jul 12 19:04:04 UTC 2010     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Organization:
>Environment:
FreeBSD pseudo 7.3-RELEASE-p2 FreeBSD 7.3-RELEASE-p2 #0: Mon Jul 12 19:04:04 UTC 2010     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
> traceroute hlfxns0188w-099192079201.pppoe-dynamic.high-speed.ns.bellaliant.net

traceroute: hostname "hlfxns0188w-099192079201.pppoe-d..." is too long

It appears to be a long-term bug (feature?) that I can see even on a 5.4 (circa 2005) and 6.2 systems. I don't have 7.4 or 8.x machine on hand to check those, but a quick search didn't reveal any PR on this issue. (It is possible that it has been fixed quietly by the developers.)

>How-To-Repeat:
> traceroute hlfxns0188w-099192079201.pppoe-dynamic.high-speed.ns.bellaliant.net

>Fix:


>Release-Note:
>Audit-Trail:

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/157732: commit references a PR
Date: Sun, 26 Jun 2011 19:03:48 +0000 (UTC)

 Author: dim
 Date: Sun Jun 26 19:03:33 2011
 New Revision: 223579
 URL: http://svn.freebsd.org/changeset/base/223579
 
 Log:
   For some reason, contrib/traceroute/traceroute.c ensures MAXHOSTNAMELEN
   is defined, but then proceeds to use a hardcoded maximum hostname length
   of 64 anyway.  Fix this by checking against MAXHOSTNAMELEN instead.
   
   PR:		bin/157732
   MFC after:	3 days
 
 Modified:
   head/contrib/traceroute/traceroute.c
 
 Modified: head/contrib/traceroute/traceroute.c
 ==============================================================================
 --- head/contrib/traceroute/traceroute.c	Sun Jun 26 19:02:34 2011	(r223578)
 +++ head/contrib/traceroute/traceroute.c	Sun Jun 26 19:03:33 2011	(r223579)
 @@ -1618,7 +1618,7 @@ gethostinfo(register char *hostname)
  	register char **p;
  	register u_int32_t addr, *ap;
  
 -	if (strlen(hostname) > 64) {
 +	if (strlen(hostname) >= MAXHOSTNAMELEN) {
  		Fprintf(stderr, "%s: hostname \"%.32s...\" is too long\n",
  		    prog, hostname);
  		exit(1);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: Dimitry Andric <dim@FreeBSD.org>
To: bug-followup@FreeBSD.org, freebsd@str.komkon.org
Cc:  
Subject: Re: bin/157732: traceroute(8) doesn't allow long host names
Date: Sun, 26 Jun 2011 21:17:18 +0200

 I committed a fix for -current in r223579.  I will MFC the fix in a few
 days, then close this PR.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/157732: commit references a PR
Date: Wed, 29 Jun 2011 16:44:04 +0000 (UTC)

 Author: dim
 Date: Wed Jun 29 16:43:44 2011
 New Revision: 223678
 URL: http://svn.freebsd.org/changeset/base/223678
 
 Log:
   MFC r223579:
   
   For some reason, contrib/traceroute/traceroute.c ensures MAXHOSTNAMELEN
   is defined, but then proceeds to use a hardcoded maximum hostname length
   of 64 anyway.  Fix this by checking against MAXHOSTNAMELEN instead.
   
   PR:	bin/157732
 
 Modified:
   stable/8/contrib/traceroute/traceroute.c
 Directory Properties:
   stable/8/contrib/traceroute/   (props changed)
 
 Modified: stable/8/contrib/traceroute/traceroute.c
 ==============================================================================
 --- stable/8/contrib/traceroute/traceroute.c	Wed Jun 29 16:40:41 2011	(r223677)
 +++ stable/8/contrib/traceroute/traceroute.c	Wed Jun 29 16:43:44 2011	(r223678)
 @@ -1625,7 +1625,7 @@ gethostinfo(register char *hostname)
  	register char **p;
  	register u_int32_t addr, *ap;
  
 -	if (strlen(hostname) > 64) {
 +	if (strlen(hostname) >= MAXHOSTNAMELEN) {
  		Fprintf(stderr, "%s: hostname \"%.32s...\" is too long\n",
  		    prog, hostname);
  		exit(1);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/157732: commit references a PR
Date: Wed, 29 Jun 2011 16:46:21 +0000 (UTC)

 Author: dim
 Date: Wed Jun 29 16:46:12 2011
 New Revision: 223679
 URL: http://svn.freebsd.org/changeset/base/223679
 
 Log:
   MFC r223579:
   
   For some reason, contrib/traceroute/traceroute.c ensures MAXHOSTNAMELEN
   is defined, but then proceeds to use a hardcoded maximum hostname length
   of 64 anyway.  Fix this by checking against MAXHOSTNAMELEN instead.
   
   PR:	bin/157732
 
 Modified:
   stable/7/contrib/traceroute/traceroute.c
 Directory Properties:
   stable/7/contrib/traceroute/   (props changed)
 
 Modified: stable/7/contrib/traceroute/traceroute.c
 ==============================================================================
 --- stable/7/contrib/traceroute/traceroute.c	Wed Jun 29 16:43:44 2011	(r223678)
 +++ stable/7/contrib/traceroute/traceroute.c	Wed Jun 29 16:46:12 2011	(r223679)
 @@ -1625,7 +1625,7 @@ gethostinfo(register char *hostname)
  	register char **p;
  	register u_int32_t addr, *ap;
  
 -	if (strlen(hostname) > 64) {
 +	if (strlen(hostname) >= MAXHOSTNAMELEN) {
  		Fprintf(stderr, "%s: hostname \"%.32s...\" is too long\n",
  		    prog, hostname);
  		exit(1);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: dim 
State-Changed-When: Wed Jun 29 19:56:46 UTC 2011 
State-Changed-Why:  
Fixes have been MFC'd to stable/8 and stable/7. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=157732 
>Unformatted:
