summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2014-07-04 08:42:39 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2014-07-04 08:42:39 +0000
commitc80b00e08f564ce1a71a29e37053b5094237b0de (patch)
treed912d9927cc7a3e9876e625e15b2c6f6f4e43114 /usr.sbin/tcpdump
parent52dba0415f89a3472c9b55a4430bea6b67cd42ba (diff)
Tcpdump did not show the OSPF router id of hello packets if it was
equal to the source ip address. This is confusing and inconsistent with IPv6. So always print the rtrid. OK stsp@
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r--usr.sbin/tcpdump/print-ospf.c6
-rw-r--r--usr.sbin/tcpdump/print-ospf6.c3
2 files changed, 3 insertions, 6 deletions
diff --git a/usr.sbin/tcpdump/print-ospf.c b/usr.sbin/tcpdump/print-ospf.c
index 665c6fa063d..30eda035fa2 100644
--- a/usr.sbin/tcpdump/print-ospf.c
+++ b/usr.sbin/tcpdump/print-ospf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ospf.c,v 1.16 2011/03/22 17:31:18 claudio Exp $ */
+/* $OpenBSD: print-ospf.c,v 1.17 2014/07/04 08:42:38 bluhm Exp $ */
/*
* Copyright (c) 1992, 1993, 1994, 1995, 1996, 1997
@@ -535,10 +535,8 @@ ospf_print(register const u_char *bp, register u_int length,
printf(" %d:", length);
dataend = bp + length;
- /* Print the routerid if it is not the same as the source */
TCHECK(op->ospf_routerid);
- if (ip->ip_src.s_addr != op->ospf_routerid.s_addr)
- printf(" rtrid %s", ipaddr_string(&op->ospf_routerid));
+ printf(" rtrid %s", ipaddr_string(&op->ospf_routerid));
TCHECK(op->ospf_areaid);
if (op->ospf_areaid.s_addr != 0)
diff --git a/usr.sbin/tcpdump/print-ospf6.c b/usr.sbin/tcpdump/print-ospf6.c
index ae7da9986e4..87c80c5fe5e 100644
--- a/usr.sbin/tcpdump/print-ospf6.c
+++ b/usr.sbin/tcpdump/print-ospf6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-ospf6.c,v 1.5 2009/10/27 23:59:55 deraadt Exp $ */
+/* $OpenBSD: print-ospf6.c,v 1.6 2014/07/04 08:42:38 bluhm Exp $ */
/*
@@ -631,7 +631,6 @@ ospf6_print(register const u_char *bp, register u_int length)
}
dataend = bp + length;
- /* Print the routerid if it is not the same as the source */
TCHECK(op->ospf6_routerid);
printf(" rtrid %s", ipaddr_string(&op->ospf6_routerid));