[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird stuff in 'netstat -rs'



>routing:
>	0 bad routing redirects
>	0 dynamically created routes
>	0 new gateways due to redirects
>	4294960290 destinations found unreachable
>	0 uses of a wildcard route

just a guess:

from /usr/src/net/route.h:

/*
 * Routing statistics.
 */
struct  rtstat {
        short   rts_badredirect;        /* bogus redirect calls */
        short   rts_dynamic;            /* routes created by redirects */
        short   rts_newgateway;         /* routes modified by redirects */
        short   rts_unreach;            /* lookups which failed */
        short   rts_wildcard;           /* lookups satisfied by a wildcard */
};

short = 16 bit signed, if I'm not mistaken...

the printf call in /usr/src/usr.bin/netstat/route.c does a:

printf("\t%u destination%s found unreachable\n",
                rtstat.rts_unreach, plural(rtstat.rts_unreach));

which is an unsigned value. 

-kj




Visit your host, monkey.org