From c2bb3a3e02071bccdf93ccb59118bc5e88ed9cd8 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Wed, 13 Sep 2000 19:53:54 +0000 Subject: Fix compilation problems and bounds-checking bug in `ifinfo'. PR: 21177 Submitted by: Craig Leres --- tools/tools/ifinfo/ifinfo.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/tools/ifinfo/ifinfo.c b/tools/tools/ifinfo/ifinfo.c index 63fad7e75fa0..8e462ddb1665 100644 --- a/tools/tools/ifinfo/ifinfo.c +++ b/tools/tools/ifinfo/ifinfo.c @@ -160,9 +160,11 @@ printit(const struct ifmibdata *ifmd) printf("\tinput queue drops: %lu\n", ifmd->ifmd_data.ifi_iqdrops); printf("\tpackets for unknown protocol: %lu\n", ifmd->ifmd_data.ifi_noproto); +#ifdef notdef printf("\treceive timing: %lu usec\n", ifmd->ifmd_data.ifi_recvtiming); printf("\ttransmit timing: %lu usec\n", ifmd->ifmd_data.ifi_xmittiming); +#endif } static const char *const if_types[] = { @@ -220,7 +222,10 @@ static const char *const if_types[] = { "SONETVT", "SMDS InterCarrier Interface", "Proprietary virtual interface", - "Proprietary multiplexing" + "Proprietary multiplexing", + "Generic tunnel interface", + "IPv6-to-IPv4 TCP relay capturing interface", + "6to4 tunnel interface" }; #define NIFTYPES ((sizeof if_types)/(sizeof if_types[0])) @@ -229,7 +234,7 @@ iftype(int type) { static char buf[256]; - if (type <= 0 || type > NIFTYPES) { + if (type <= 0 || type >= NIFTYPES) { sprintf(buf, "unknown type %d", type); return buf; } -- cgit v1.3