diff options
author | wollman <wollman@FreeBSD.org> | 2000-09-13 19:53:54 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 2000-09-13 19:53:54 +0000 |
commit | dfd657f7477cdc7610ff5c298285bcbf6f811e4d (patch) | |
tree | 4c879a508d16a8ee4ff191a486159bff3f763f94 /tools | |
parent | 7013b8322587468516f271030ba6f1e1e8ad2505 (diff) | |
download | FreeBSD-src-dfd657f7477cdc7610ff5c298285bcbf6f811e4d.zip FreeBSD-src-dfd657f7477cdc7610ff5c298285bcbf6f811e4d.tar.gz |
Fix compilation problems and bounds-checking bug in `ifinfo'.
PR: 21177
Submitted by: Craig Leres <leres@ee.lbl.gov>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/ifinfo/ifinfo.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/tools/ifinfo/ifinfo.c b/tools/tools/ifinfo/ifinfo.c index 63fad7e..8e462dd 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; } |