diff options
Diffstat (limited to 'ospfd/ospf_flood.c')
| -rw-r--r-- | ospfd/ospf_flood.c | 55 |
1 files changed, 38 insertions, 17 deletions
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index f3fe504a07..e15871ac81 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -154,11 +154,11 @@ struct external_info *ospf_external_info_check(struct ospf *ospf, redist_on = is_default_prefix4(&p) ? vrf_bitmap_check( - zclient->default_information[AFI_IP], - ospf->vrf_id) - : (zclient->mi_redist[AFI_IP][type].enabled - || vrf_bitmap_check( - zclient->redist[AFI_IP][type], + &zclient->default_information[AFI_IP], + ospf->vrf_id) + : (zclient->mi_redist[AFI_IP][type].enabled || + vrf_bitmap_check( + &zclient->redist[AFI_IP][type], ospf->vrf_id)); // Pending: check for MI above. if (redist_on) { @@ -568,6 +568,15 @@ int ospf_flood_through_interface(struct ospf_interface *oi, if (!ospf_if_is_enable(oi)) return 0; + if (IS_OPAQUE_LSA(lsa->data->type) && + !OSPF_IF_PARAM(oi, opaque_capable)) { + if (IS_DEBUG_OSPF(lsa, LSA_FLOODING)) + zlog_debug( + "%s: Skipping interface %s (%s) with opaque disabled.", + __func__, IF_NAME(oi), ospf_get_name(oi->ospf)); + return 0; + } + /* If flood reduction is configured, set the DC bit on the lsa. */ if (IS_LSA_SELF(lsa)) { if (OSPF_FR_CONFIG(oi->area->ospf, oi->area)) { @@ -756,8 +765,9 @@ int ospf_flood_through_interface(struct ospf_interface *oi, packets must be sent, as unicasts, to each adjacent neighbor (i.e., those in state Exchange or greater). The destination IP addresses for these packets are the neighbors' IP - addresses. */ - if (oi->type == OSPF_IFTYPE_NBMA) { + addresses. This behavior is extended to P2MP networks which + don't support broadcast. */ + if (OSPF_IF_NON_BROADCAST(oi)) { struct ospf_neighbor *nbr; for (rn = route_top(oi->nbrs); rn; rn = route_next(rn)) { @@ -770,15 +780,26 @@ int ospf_flood_through_interface(struct ospf_interface *oi, OSPF_SEND_PACKET_DIRECT); } } else - /* Optimization: for P2MP interfaces, - don't send back out the incoming interface immediately, - allow time to rx multicast ack to the rx'ed (multicast) - update */ - if (retx_flag != 1 || - oi->type != OSPF_IFTYPE_POINTOMULTIPOINT || inbr == NULL || - oi != inbr->oi) - ospf_ls_upd_send_lsa(oi->nbr_self, lsa, - OSPF_SEND_PACKET_INDIRECT); + /* If P2MP delayed reflooding is configured and the LSA was + received from a neighbor on the P2MP interface, do not flood + if back out on the interface. The LSA will be retransmitted + upon expiration of each neighbor's retransmission timer. This + will allow time to receive a multicast multicast link state + acknoweldgement and remove the LSA from each neighbor's link + state retransmission list. */ + if (oi->p2mp_delay_reflood && + (oi->type == OSPF_IFTYPE_POINTOMULTIPOINT) && + (inbr != NULL) && (oi == inbr->oi)) { + if (IS_DEBUG_OSPF(lsa, LSA_FLOODING)) + zlog_debug( + "Delay reflooding for LSA[%s] from NBR %pI4 on interface %s", + dump_lsa_key(lsa), + inbr ? &(inbr->router_id) + : &(oi->ospf->router_id), + IF_NAME(oi)); + } else + ospf_ls_upd_send_lsa(oi->nbr_self, lsa, + OSPF_SEND_PACKET_INDIRECT); return 0; } @@ -934,7 +955,7 @@ int ospf_flood_through(struct ospf *ospf, struct ospf_neighbor *inbr, if (IS_DEBUG_OSPF_NSSA) zlog_debug("%s: LOCAL NSSA FLOOD of Type-7.", __func__); - /* Fallthrough */ + fallthrough; default: lsa_ack_flag = ospf_flood_through_area(lsa->area, inbr, lsa); break; |
