- do not check/advertise cloned routes, nor dynamic routes
- cast size_t on printing (be friendly with alpha) Obtained from: KAME
This commit is contained in:
parent
b61c02a706
commit
bcfb36405d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69279
@ -1,5 +1,5 @@
|
||||
/* $FreeBSD$ */
|
||||
/* $KAME: route6d.c,v 1.35 2000/08/13 00:39:44 itojun Exp $ */
|
||||
/* $KAME: route6d.c,v 1.37 2000/10/10 13:02:30 itojun Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char _rcsid[] = "$KAME: route6d.c,v 1.35 2000/08/13 00:39:44 itojun Exp $";
|
||||
static char _rcsid[] = "$KAME: route6d.c,v 1.37 2000/10/10 13:02:30 itojun Exp $";
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
@ -1459,8 +1459,8 @@ rtrecv()
|
||||
exit(-1);
|
||||
}
|
||||
if (len < sizeof(*rtm)) {
|
||||
trace(1, "short read from rtsock: %d (should be > %d)\n",
|
||||
len, sizeof(*rtm));
|
||||
trace(1, "short read from rtsock: %d (should be > %lu)\n",
|
||||
len, (u_long)sizeof(*rtm));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2220,7 +2220,8 @@ krtread(again)
|
||||
}
|
||||
} while (retry < 5 && errmsg != NULL);
|
||||
if (errmsg)
|
||||
fatal("%s (with %d retries, msize=%d)", errmsg, retry, msize);
|
||||
fatal("%s (with %d retries, msize=%lu)", errmsg, retry,
|
||||
(u_long)msize);
|
||||
else if (1 < retry)
|
||||
syslog(LOG_INFO, "NET_RT_DUMP %d retires", retry);
|
||||
|
||||
@ -2249,6 +2250,21 @@ rt_entry(rtm, again)
|
||||
(RTF_CLONING|RTF_XRESOLVE|RTF_LLINFO|RTF_BLACKHOLE)) {
|
||||
return; /* not interested in the link route */
|
||||
}
|
||||
/* do not look at cloned routes */
|
||||
#ifdef RTF_WASCLONED
|
||||
if (rtm->rtm_flags & RTF_WASCLONED)
|
||||
return;
|
||||
#endif
|
||||
#ifdef RTF_CLONED
|
||||
if (rtm->rtm_flags & RTF_CLONED)
|
||||
return;
|
||||
#endif
|
||||
/*
|
||||
* do not look at dynamic routes.
|
||||
* netbsd/openbsd cloned routes have UGHD.
|
||||
*/
|
||||
if (rtm->rtm_flags & RTF_DYNAMIC)
|
||||
return;
|
||||
rtmp = (char *)(rtm + 1);
|
||||
/* Destination */
|
||||
if ((rtm->rtm_addrs & RTA_DST) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user