Fixed bug with decoding RIP packets - removed unnecessary ntohs()'s for

the sa_family.
This commit is contained in:
David Greenman 1995-08-26 12:40:05 +00:00
parent 46babfb66f
commit 87414cb81d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10329

View File

@ -21,7 +21,7 @@
#ifndef lint
static char rcsid[] =
"@(#) $Header: print-rip.c,v 1.20 94/06/14 20:18:47 leres Exp $ (LBL)";
"@(#) $Header: /home/ncvs/src/usr.sbin/tcpdump/tcpdump/print-rip.c,v 1.4 1995/03/08 12:52:40 olah Exp $ (LBL)";
#endif
#include <sys/param.h>
@ -47,10 +47,10 @@ static char rcsid[] =
static void
rip_entry_print(register const struct netinfo *ni)
{
if (ntohs(ni->rip_dst.sa_family) != AF_INET) {
if (ni->rip_dst.sa_family != AF_INET) {
register int i;
printf(" [family %d:", ntohs(ni->rip_dst.sa_family));
printf(" [family %d:", ni->rip_dst.sa_family);
for (i = 0; i < 14; i += 2)
printf(" %02x%02x", (u_char)ni->rip_dst.sa_data[i],
(u_char)ni->rip_dst.sa_data[i+1]);