Merge pull request #8615 from dslicenc/eigrp-asn-check

eigrpd: Test for EIGRP AS number and ensure it's the same
This commit is contained in:
Russ White 2021-05-04 07:43:48 -04:00 committed by GitHub
commit c973779d02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -572,9 +572,14 @@ int eigrp_read(struct thread *thread)
&& IS_DEBUG_EIGRP_TRANSMIT(0, PACKET_DETAIL))
eigrp_header_dump(eigrph);
// if (MSG_OK != eigrp_packet_examin(eigrph, stream_get_endp(ibuf) -
// stream_get_getp(ibuf)))
// return -1;
if (ntohs(eigrph->ASNumber) != eigrp->AS) {
if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV))
zlog_debug(
"ignoring packet from router %u sent to %pI4, wrong AS Number received: %u",
ntohs(eigrph->vrid), &iph->ip_dst,
ntohs(eigrph->ASNumber));
return 0;
}
/* If incoming interface is passive one, ignore it. */
if (eigrp_if_is_passive(ei)) {