From c80b00e08f564ce1a71a29e37053b5094237b0de Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Fri, 4 Jul 2014 08:42:39 +0000 Subject: 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@ --- usr.sbin/tcpdump/print-ospf.c | 6 ++---- usr.sbin/tcpdump/print-ospf6.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'usr.sbin/tcpdump') 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)); -- cgit v1.2.3