From 13cd3dc1e8281cc6fdc576fb0b62e71a9e170cae Mon Sep 17 00:00:00 2001
From: "Andrew J. Schorr" <ajschorr@alumni.princeton.edu>
Date: Tue, 11 Jul 2006 01:50:30 +0000
Subject: [ospfd] Improve Hello NetworkMask mismatch warning to give more info

2006-07-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

	* ospf_packet.c: (ospf_hello) Improve NetworkMask mismatch warning
	  message to include interface name and conflicting prefix lengths.
---
 ospfd/ChangeLog     | 5 +++++
 ospfd/ospf_packet.c | 5 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

(limited to 'ospfd')

diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 7c374fb8..1bc3232a 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,8 @@
+2006-07-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+	* ospf_packet.c: (ospf_hello) Improve NetworkMask mismatch warning
+	  message to include interface name and conflicting prefix lengths.
+
 2006-07-07 Paul Jakma <paul.jakma@sun.com>
 
 	* ospf_nsm.h: Add a NSM_Deleted neighbour state, to act as dummy
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 569f2513..788daba3 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -785,8 +785,9 @@ ospf_hello (struct ip *iph, struct ospf_header *ospfh,
       && oi->type != OSPF_IFTYPE_VIRTUALLINK)
     if (oi->address->prefixlen != p.prefixlen)
       {
-	zlog_warn ("Packet %s [Hello:RECV]: NetworkMask mismatch.",
-		   inet_ntoa (ospfh->router_id));
+	zlog_warn ("Packet %s [Hello:RECV]: NetworkMask mismatch on %s (configured prefix length is %d, but hello packet indicates %d).",
+		   inet_ntoa(ospfh->router_id), IF_NAME(oi),
+		   (int)oi->address->prefixlen, (int)p.prefixlen);
 	return;
       }
 
-- 
cgit v1.2.1