mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 13:33:15 +00:00
eigrpd: Fix crash in reply receive packet.
When we receive a reply for a prefix we no longer have we should note the issue and move on instead of crashing eigrp. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
68b7dd07d5
commit
b42a4a099a
@ -149,7 +149,10 @@ void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph,
|
|||||||
|
|
||||||
while (s->endp > s->getp) {
|
while (s->endp > s->getp) {
|
||||||
type = stream_getw(s);
|
type = stream_getw(s);
|
||||||
if (type == EIGRP_TLV_IPv4_INT) {
|
|
||||||
|
if (type != EIGRP_TLV_IPv4_INT)
|
||||||
|
continue;
|
||||||
|
|
||||||
struct prefix dest_addr;
|
struct prefix dest_addr;
|
||||||
|
|
||||||
stream_set_getp(s, s->getp - sizeof(u_int16_t));
|
stream_set_getp(s, s->getp - sizeof(u_int16_t));
|
||||||
@ -165,7 +168,13 @@ void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph,
|
|||||||
/*
|
/*
|
||||||
* Destination must exists
|
* Destination must exists
|
||||||
*/
|
*/
|
||||||
assert(dest);
|
if (!dest) {
|
||||||
|
char buf[PREFIX_STRLEN];
|
||||||
|
zlog_err("%s: Received prefix %s which we do not know about",
|
||||||
|
__PRETTY_FUNCTION__,
|
||||||
|
prefix2str(&dest_addr, buf, strlen(buf)));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
struct eigrp_fsm_action_message msg;
|
struct eigrp_fsm_action_message msg;
|
||||||
struct eigrp_nexthop_entry *entry =
|
struct eigrp_nexthop_entry *entry =
|
||||||
@ -189,9 +198,7 @@ void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph,
|
|||||||
msg.prefix = dest;
|
msg.prefix = dest;
|
||||||
eigrp_fsm_event(&msg);
|
eigrp_fsm_event(&msg);
|
||||||
|
|
||||||
|
|
||||||
eigrp_IPv4_InternalTLV_free(tlv);
|
eigrp_IPv4_InternalTLV_free(tlv);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
eigrp_hello_send_ack(nbr);
|
eigrp_hello_send_ack(nbr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user