From 9b18d58e17d7e84f17114e5f4a6461dd7e250580 Mon Sep 17 00:00:00 2001 From: Nitin Soni Date: Thu, 24 Jan 2019 00:44:42 -0800 Subject: ospfd: ospfd core if hello packet exceeds link MTU Ospfd cored because of an assert when we try to write more than the MTU size to the ospf packet buffer stream. The problem is - we allocate only MTU sized buffer. The expectation is that Hello packets are never large enough to approach MTU. Instead of crashing, this fix discards hello and logs an error. One should not have so many neighbors behind an interface. Ticket: CM-22380 Signed-off-by: Nitin Soni Reviewed-by: CCR-8204 --- ospfd/ospf_errors.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ospfd/ospf_errors.c') diff --git a/ospfd/ospf_errors.c b/ospfd/ospf_errors.c index 566fc29202..b912a80692 100644 --- a/ospfd/ospf_errors.c +++ b/ospfd/ospf_errors.c @@ -169,6 +169,15 @@ static struct log_ref ferr_ospf_err[] = { .description = "OSPF has attempted to change states when it should not be able to", .suggestion = "Gather log files and open an issue", }, + { + .code = EC_OSPF_LARGE_HELLO, + .title = "OSPF Encountered a Large Hello", + .description = "OSPF attempted to send a Hello larger than MTU " + "but did not", + .suggestion = "Too many neighbors configured on a single interface." + " Suggestion is to decrease the number of neighbors on" + " a single interface/subnet" + }, { .code = END_FERR, } -- cgit v1.2.3