From owner-freebsd-questions Wed Dec 20 2:47:24 2000 From owner-freebsd-questions@FreeBSD.ORG Wed Dec 20 02:47:21 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from d9168.upc-d.chello.nl (d9168.upc-d.chello.nl [213.46.9.168]) by hub.freebsd.org (Postfix) with ESMTP id 7D1CA37B402 for ; Wed, 20 Dec 2000 02:47:14 -0800 (PST) Received: by d9168.upc-d.chello.nl (Postfix, from userid 1001) id 7DAD82E8; Wed, 20 Dec 2000 11:47:12 +0100 (CET) Date: Wed, 20 Dec 2000 11:47:12 +0100 From: Edwin Groothuis To: Iana Liadze Cc: freebsd-questions@FreeBSD.ORG Subject: Re: rwhod? Message-ID: <20001220114712.A59674@d9168.upc-d.chello.nl> Mail-Followup-To: Edwin Groothuis , Iana Liadze , freebsd-questions@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from iana@parliament.ge on Wed, Dec 20, 2000 at 12:34:54PM +0400 Sender: edwin@d9168.upc-d.chello.nl Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Dec 20, 2000 at 12:34:54PM +0400, Iana Liadze wrote: > Did anybody have the following messages: > rwhod:malformed host name from 238d48d grepping the source: if (!verify(wd.wd_hostname, sizeof wd.wd_hostname)) { syslog(LOG_WARNING, "malformed host name from %x", from.sin_addr); continue; } So it's a hex representation of the IP address 02 38 d4 8d = 2.56.212.141 (or 141.212.56.2, I'm never sure about this) wd_hostname is *your* hostname, as initialized at the begin of main(). /* * Establish host name as returned by system. */ if (gethostname(myname, sizeof(myname) - 1) < 0) { syslog(LOG_ERR, "gethostname: %m"); exit(1); } if ((cp = index(myname, '.')) != NULL) *cp = '\0'; strncpy(mywd.wd_hostname, myname, sizeof(mywd.wd_hostname) - 1); mywd.wd_hostname[sizeof(mywd.wd_hostname) - 1] = '\0'; So, what is the hostname of your machine? It shouldn't contain anything but 0-9, a-z and A-Z and its size should be >0. See the verify function for this (hmmm... shouldn't the minus (-) be allowed in this?) Edwin, loves having the source-code! -- Edwin Groothuis | Interested in MUDs? Visit Fatal Dimensions: mavetju@chello.nl | http://fataldimensions.nl.eu.org/ ------------------+ telnet://fataldimensions.nl.eu.org:4000 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message