Bug 120957 - net/msntp prohibits host names beginning with a digit
Summary: net/msntp prohibits host names beginning with a digit
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Beech Rintoul
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-22 02:10 UTC by Virgil Champlin
Modified: 2008-02-22 19:40 UTC (History)
0 users

See Also:


Attachments
patch-internet.c (692 bytes, text/plain)
2008-02-22 02:10 UTC, Virgil Champlin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Virgil Champlin 2008-02-22 02:10:01 UTC
	The current version of msntp (v1.6, October 2000) does not allow
	host name arguments that begin with a digit.  It does this in
	internet.c by testing the first character of the argument
	string.  If it is a digit, it assumes the string is dotted quad
	and uses gethostbyaddr(3) for look up.  If otherwise, it will use
	gethostbyname(3).  This fails legal host names as defined by
	RFC-1133.

Fix: Since gethostbyname(3) already handles dotted quad strings as
	arguments, simply remove the previously mentioned conditional
	code in internet.c.  Please see the included patch.

	I contacted the original author of msntp and verified that he no
	longer maintains nor knows of any current maintainer for msntp.
	Would it be possible to include the following patch in the
	net/msntp port?  I ask because msntp is the ntp server used by
	m0n0wall, the FreeBSD based firewall project at
	http://m0n0.ch/wall/.  It is very popular and this bug has
	bitten there.

	As usual, I can not thank you enough for all your time and
	effort.  -virgil
How-To-Repeat: 	Use msntp with a legitimate host name that begins with a digit.
	
	    moose[879] msntp 0.north-america.pool.ntp.org
	    msntp: invalid IP number 0.north-america.pool.ntp.org
Comment 1 Beech Rintoul freebsd_committer freebsd_triage 2008-02-22 19:02:38 UTC
Responsible Changed
From-To: freebsd-ports-bugs->beech

I'll take it
Comment 2 dfilter service freebsd_committer freebsd_triage 2008-02-22 19:39:31 UTC
beech       2008-02-22 19:39:27 UTC

  FreeBSD ports repository

  Modified files:
    net/msntp            Makefile 
  Added files:
    net/msntp/files      patch-internet.c 
  Removed files:
    net/msntp            pkg-plist 
  Log:
  - Fix with a legitimate host name that begins with a digit.
  - Makefile cleanup
  - Bump portrevision
  
  PR:             ports/120957
  Submitted by:   Virgil Champlin <champlin@stupidog.org>
  
  Revision  Changes    Path
  1.3       +6 -4      ports/net/msntp/Makefile
  1.1       +22 -0     ports/net/msntp/files/patch-internet.c (new)
  1.3       +0 -4      ports/net/msntp/pkg-plist (dead)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 3 Beech Rintoul freebsd_committer freebsd_triage 2008-02-22 19:39:47 UTC
State Changed
From-To: open->closed

Committed, Thanks!