Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 1996 22:39:11 -0700 (PDT)
From:      "Rodney W. Grimes" <rgrimes@GndRsh.aac.dev.com>
To:        robert@chalmers.com.au (Robert Chalmers)
Cc:        freebsd-isp@FreeBSD.org
Subject:   Re: Who knows about routed?
Message-ID:  <199608250539.WAA17651@GndRsh.aac.dev.com>
In-Reply-To: <m0uuTlT-00030bC@nanguo.chalmers.com.au> from Robert Chalmers at "Aug 25, 96 11:13:23 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> Can someone routed guru please tell me what this is trying to say,
> apart from the obvious...
> 
> 
> nanguo routed[304]: bad host in route from eros (af 2) 
> nanguo routed[304]: bad host in route from eros (af 2) 
                                                  ^^^^^^ af 2 == INET

                      ^^^^^^^^ this is coming from this part of input.c:

                        if (((*afp->af_checkhost)(&n->rip_dst)) == 0) {
                                syslog(LOG_DEBUG, 
                                    "bad host in route from %s (af %d)\n",
                                   (*afswitch[from->sa_family].af_format)(from),
                                   from->sa_family);
                                continue;
                        }

> Just what does routed see as a "bad host" ?

It means that the IP address is not believed to be an internet host,
and by following the indirection of *afp->af_checkhost you end up in
this chunk of code:

/* 
 * Return 1 if the address is believed
 * for an Internet host -- THIS IS A KLUDGE.
 */     
inet_checkhost(sin)
        struct sockaddr_in *sin;
{
        u_long i = ntohl(sin->sin_addr.s_addr);
 
#ifndef IN_EXPERIMENTAL
#define IN_EXPERIMENTAL(i)      (((long) (i) & 0xe0000000) == 0xe0000000)
#endif 
 
        if (IN_EXPERIMENTAL(i) || sin->sin_port != 0)
                return (0);
        if (i != 0 && (i & 0xff000000) == 0)
                return (0);
        for (i = 0; i < sizeof(sin->sin_zero)/sizeof(sin->sin_zero[0]); i++)
                if (sin->sin_zero[i])
                        return (0);
        return (1);
}


There should probably be additional data in the logged message (ie,
a pretty print of &n->rip_dst->sin_addr.s_addr would tell you exactly
what data was rejected by inet_checkhost.

> it's filling my log files...

The host eros routed is probably sending out funny routes :-(.

-- 
Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
Accurate Automation Company                 Reliable computers for FreeBSD



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608250539.WAA17651>