diff options
| author | Lou Berger <lberger@labn.net> | 2022-10-28 16:06:04 +0000 | 
|---|---|---|
| committer | Lou Berger <lberger@labn.net> | 2022-10-29 12:33:23 +0000 | 
| commit | 53674eaba6a34f42f322f79449c2ab667884fb82 (patch) | |
| tree | 40186d76ba6fe3e16de69a469cd5c93b709fceb7 | |
| parent | 15c4dd82dba35467c598d48407dc1238983bb31b (diff) | |
ospfd: catch and report runt LSAs
Signed-off-by: Lou Berger <lberger@labn.net>
| -rw-r--r-- | ospfd/ospf_packet.c | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 466b5fa2a2..8c87a568c0 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -1716,6 +1716,12 @@ static struct list *ospf_ls_upd_list_lsa(struct ospf_neighbor *nbr,  			break;  		} +		if (length < OSPF_LSA_HEADER_SIZE) { +			flog_warn(EC_OSPF_PACKET, +				  "Link State Update: LSA length too small."); +			break; +		} +  		/* Validate the LSA's LS checksum. */  		sum = lsah->checksum;  		if (!ospf_lsa_checksum_valid(lsah)) {  | 
