Fixed bug with decoding RIP packets - removed unnecessary ntohs()'s for
the sa_family.
This commit is contained in:
parent
480af4c950
commit
4ecefb1908
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user