diff options
Diffstat (limited to 'ospfd/ospf_packet.c')
| -rw-r--r-- | ospfd/ospf_packet.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 2d15a7ecca..d35f0a1372 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -2806,9 +2806,7 @@ static enum ospf_read_return_enum ospf_read_helper(struct ospf *ospf) * or header area is backbone but ospf_interface is not * check for VLINK interface */ - if ((oi == NULL) - || (OSPF_IS_AREA_ID_BACKBONE(ospfh->area_id) - && !OSPF_IS_AREA_ID_BACKBONE(oi->area->area_id))) { + if (oi == NULL) { if ((oi = ospf_associate_packet_vl(ospf, ifp, iph, ospfh)) == NULL) { if (!ospf->instance && IS_DEBUG_OSPF_EVENT) @@ -2817,6 +2815,15 @@ static enum ospf_read_return_enum ospf_read_helper(struct ospf *ospf) &iph->ip_src, ifp->name); return OSPF_READ_CONTINUE; } + } else if (OSPF_IS_AREA_ID_BACKBONE(ospfh->area_id) && + !OSPF_IS_AREA_ID_BACKBONE(oi->area->area_id)) { + oi = ospf_associate_packet_vl(ospf, ifp, iph, ospfh); + if (oi == NULL) { + flog_warn(EC_OSPF_PACKET, + "interface %s: ospf_read invalid Area ID %pI4", + ifp->name, &ospfh->area_id); + return OSPF_READ_CONTINUE; + } } /* @@ -3335,7 +3342,7 @@ static int ospf_make_ls_ack(struct ospf_interface *oi, struct ospf_lsa_list_entry *ls_ack_list_entry; uint16_t length = OSPF_LS_ACK_MIN_SIZE; struct ospf_lsa *lsa; - struct in_addr first_dst_addr; + struct in_addr first_dst_addr = { INADDR_ANY }; /* * For direct LS Acks, assure the destination address doesn't @@ -3346,8 +3353,7 @@ static int ospf_make_ls_ack(struct ospf_interface *oi, if (ls_ack_list_first) first_dst_addr.s_addr = ls_ack_list_first->list_entry_dst.s_addr; - } else - first_dst_addr.s_addr = INADDR_ANY; + } frr_each_safe (ospf_lsa_list, ls_ack_list, ls_ack_list_entry) { lsa = ls_ack_list_entry->lsa; |
