eigrpd: Test for EIGRP AS number and ensure it's the same

When receiving a packet, ensure that the AS number is the same.

Fixes: 8515
Signed-off-by: Don Slice <dslice@nvidia.com>
This commit is contained in:
Don Slice 2021-05-03 07:57:29 -04:00
parent f71e1ff6a9
commit 9f92e2352b

View File

@ -572,9 +572,14 @@ int eigrp_read(struct thread *thread)
&& IS_DEBUG_EIGRP_TRANSMIT(0, PACKET_DETAIL)) && IS_DEBUG_EIGRP_TRANSMIT(0, PACKET_DETAIL))
eigrp_header_dump(eigrph); eigrp_header_dump(eigrph);
// if (MSG_OK != eigrp_packet_examin(eigrph, stream_get_endp(ibuf) - if (ntohs(eigrph->ASNumber) != eigrp->AS) {
// stream_get_getp(ibuf))) if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV))
// return -1; 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 incoming interface is passive one, ignore it. */
if (eigrp_if_is_passive(ei)) { if (eigrp_if_is_passive(ei)) {