static void ospf_ext_lsa_schedule(struct ext_itf *exti, enum lsa_opcode op);
static int ospf_ext_link_lsa_update(struct ospf_lsa *lsa);
static int ospf_ext_pref_lsa_update(struct ospf_lsa *lsa);
+static void ospf_ext_link_delete_adj_sid(struct ext_itf *exti);
static void del_ext_info(void *val);
/*
exti->lan_sid[index].neighbor_id = neighbor_id;
}
+static void unset_adjacency_sid(struct ext_itf *exti)
+{
+ /* Reset Adjacency TLV */
+ if (exti->type == ADJ_SID) {
+ TLV_TYPE(exti->adj_sid[0]) = 0;
+ TLV_TYPE(exti->adj_sid[1]) = 0;
+ }
+ /* or Lan-Adjacency TLV */
+ if (exti->type == LAN_ADJ_SID) {
+ TLV_TYPE(exti->lan_sid[0]) = 0;
+ TLV_TYPE(exti->lan_sid[1]) = 0;
+ }
+}
+
/* Experimental SubTLV from Cisco */
static void set_rmt_itf_addr(struct ext_itf *exti, struct in_addr rmtif)
{
exti->rmt_itf_addr.value = rmtif;
}
+/* Delete Extended LSA */
+static void ospf_extended_lsa_delete(struct ext_itf *exti)
+{
+
+ /* Process only Active Extended Prefix/Link LSA */
+ if (!CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE))
+ return;
+
+ osr_debug("EXT (%s): Disable %s%s%s-SID on interface %s", __func__,
+ exti->stype == LOCAL_SID ? "Prefix" : "",
+ exti->stype == ADJ_SID ? "Adjacency" : "",
+ exti->stype == LAN_ADJ_SID ? "LAN-Adjacency" : "",
+ exti->ifp->name);
+
+ /* Flush LSA if already engaged */
+ if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED)) {
+ ospf_ext_lsa_schedule(exti, FLUSH_THIS_LSA);
+ UNSET_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED);
+ }
+
+ /* De-activate this Extended Prefix/Link and remove corresponding
+ * Segment-Routing Prefix-SID or (LAN)-ADJ-SID */
+ if (exti->stype == ADJ_SID || exti->stype == LAN_ADJ_SID)
+ ospf_ext_link_delete_adj_sid(exti);
+ else
+ ospf_sr_ext_itf_delete(exti);
+}
+
/*
* Update Extended prefix SID index for Loopback interface type
*
return rc;
if (p != NULL) {
- if (IS_DEBUG_OSPF_SR)
- zlog_debug(
- "EXT (%s): Schedule new prefix %s/%u with "
- "index %u on interface %s",
- __func__, inet_ntoa(p->prefix), p->prefixlen,
- index, ifp->name);
+ osr_debug("EXT (%s): Schedule new prefix %pFX with index %u on interface %s", __func__, p, index, ifp->name);
/* Set first Extended Prefix then the Prefix SID information */
set_ext_prefix(exti, OSPF_PATH_INTRA_AREA, EXT_TLV_PREF_NFLG,
set_prefix_sid(exti, SR_ALGORITHM_SPF, index, SID_INDEX, flags);
/* Try to Schedule LSA */
- // SET_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE);
if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE)) {
if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED))
ospf_ext_pref_lsa_schedule(exti,
exti, REORIGINATE_THIS_LSA);
}
} else {
- if (IS_DEBUG_OSPF_SR)
- zlog_debug("EXT (%s): Remove prefix for interface %s",
- __func__, ifp->name);
+ osr_debug("EXT (%s): Remove prefix for interface %s", __func__,
+ ifp->name);
- if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED)) {
+ if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED))
ospf_ext_pref_lsa_schedule(exti, FLUSH_THIS_LSA);
- exti->flags = EXT_LPFLG_LSA_INACTIVE;
- }
}
return SET_OPAQUE_LSID(exti->type, exti->instance);
}
+/**
+ * Update Adjacecny-SID for Extended Link LSA
+ *
+ * @param exti Extended Link information
+ */
+static void ospf_ext_link_update_adj_sid(struct ext_itf *exti)
+{
+ mpls_label_t label;
+ mpls_label_t bck_label;
+
+ /* Process only (LAN)Adjacency-SID Type */
+ if (exti->stype != ADJ_SID && exti->stype != LAN_ADJ_SID)
+ return;
+
+ /* Request Primary & Backup Labels from Label Manager */
+ bck_label = ospf_sr_local_block_request_label();
+ label = ospf_sr_local_block_request_label();
+ if (bck_label == MPLS_INVALID_LABEL || label == MPLS_INVALID_LABEL) {
+ if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED))
+ ospf_ext_lsa_schedule(exti, FLUSH_THIS_LSA);
+ return;
+ }
+
+ /* Set Adjacency-SID, backup first */
+ if (exti->stype == ADJ_SID) {
+ set_adj_sid(exti, true, bck_label, SID_LABEL);
+ set_adj_sid(exti, false, label, SID_LABEL);
+ } else {
+ set_lan_adj_sid(exti, true, bck_label, SID_LABEL,
+ exti->lan_sid[0].neighbor_id);
+ set_lan_adj_sid(exti, false, label, SID_LABEL,
+ exti->lan_sid[1].neighbor_id);
+ }
+
+ /* Finally, add corresponding SR Link in SRDB & MPLS LFIB */
+ SET_FLAG(exti->flags, EXT_LPFLG_FIB_ENTRY_SET);
+ ospf_sr_ext_itf_add(exti);
+}
+
+/**
+ * Delete Adjacecny-SID for Extended Link LSA
+ *
+ * @param exti Extended Link information
+ */
+static void ospf_ext_link_delete_adj_sid(struct ext_itf *exti)
+{
+ /* Process only (LAN)Adjacency-SID Type */
+ if (exti->stype != ADJ_SID && exti->stype != LAN_ADJ_SID)
+ return;
+
+ /* Release Primary & Backup Labels from Label Manager */
+ if (exti->stype == ADJ_SID) {
+ ospf_sr_local_block_release_label(exti->adj_sid[0].value);
+ ospf_sr_local_block_release_label(exti->adj_sid[1].value);
+ } else {
+ ospf_sr_local_block_release_label(exti->lan_sid[0].value);
+ ospf_sr_local_block_release_label(exti->lan_sid[1].value);
+ }
+ /* And reset corresponding TLV */
+ unset_adjacency_sid(exti);
+
+ /* Finally, remove corresponding SR Link in SRDB & MPLS LFIB */
+ UNSET_FLAG(exti->flags, EXT_LPFLG_FIB_ENTRY_SET);
+ ospf_sr_ext_itf_delete(exti);
+}
+
+/**
+ * Update Extended Link LSA once Segment Routing Label Block has been changed.
+ */
+void ospf_ext_link_srlb_update(void)
+{
+ struct listnode *node;
+ struct ext_itf *exti;
+
+
+ osr_debug("EXT (%s): Update Extended Links with new SRLB", __func__);
+
+ /* Update all Extended Link Adjaceny-SID */
+ for (ALL_LIST_ELEMENTS_RO(OspfEXT.iflist, node, exti)) {
+ /* Skip Extended Prefix */
+ if (exti->stype == PREF_SID || exti->stype == LOCAL_SID)
+ continue;
+
+ /* Skip inactive Extended Link */
+ if (!CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE))
+ continue;
+
+ ospf_ext_link_update_adj_sid(exti);
+ }
+}
+
/*
* Used by Segment Routing to activate/deactivate Extended Link/Prefix flooding
*
struct listnode *node;
struct ext_itf *exti;
- if (IS_DEBUG_OSPF_SR)
- zlog_debug("EXT (%s): %s Extended LSAs for Segment Routing ",
- __func__, enable ? "Enable" : "Disable");
+ osr_debug("EXT (%s): %s Extended LSAs for Segment Routing ", __func__,
+ enable ? "Enable" : "Disable");
if (enable) {
OspfEXT.enabled = true;
/* Refresh LSAs if already engaged or originate */
for (ALL_LIST_ELEMENTS_RO(OspfEXT.iflist, node, exti)) {
+ /* Skip Inactive Extended Link */
if (!CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE))
continue;
+ /* Update Extended Link (LAN)Adj-SID if not set */
+ if (!CHECK_FLAG(exti->flags, EXT_LPFLG_FIB_ENTRY_SET))
+ ospf_ext_link_update_adj_sid(exti);
+
+ /* Finally, flood the extended Link */
if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED))
ospf_ext_lsa_schedule(exti, REFRESH_THIS_LSA);
else
REORIGINATE_THIS_LSA);
}
} else {
- /* Start by Flushing engaged LSAs */
- for (ALL_LIST_ELEMENTS_RO(OspfEXT.iflist, node, exti)) {
- if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED))
- ospf_ext_lsa_schedule(exti, FLUSH_THIS_LSA);
- exti->flags = EXT_LPFLG_LSA_INACTIVE;
- }
+ /* Start by Removing Extended LSA */
+ for (ALL_LIST_ELEMENTS_RO(OspfEXT.iflist, node, exti))
+ ospf_extended_lsa_delete(exti);
/* And then disable Extended Link/Prefix */
OspfEXT.enabled = false;
}
}
+
/*
* -----------------------------------------------------------------------
* Followings are callback functions against generic Opaque-LSAs handling
exti = lookup_ext_by_ifp(ifp);
if (exti != NULL) {
- struct list *iflist = OspfEXT.iflist;
+ /* Flush LSA and remove Adjacency SID */
+ ospf_extended_lsa_delete(exti);
/* Dequeue listnode entry from the list. */
- listnode_delete(iflist, exti);
+ listnode_delete(OspfEXT.iflist, exti);
XFREE(MTYPE_OSPF_EXT_PARAMS, exti);
/* Reset Extended information if ospf interface goes Down */
if (oi->state == ISM_Down) {
+ ospf_extended_lsa_delete(exti);
exti->area = NULL;
exti->flags = EXT_LPFLG_LSA_INACTIVE;
return;
exti->instance = get_ext_pref_instance_value();
exti->area = oi->area;
- zlog_debug("EXT (%s): Set Prefix SID to interface %s ",
- __func__, oi->ifp->name);
+ osr_debug("EXT (%s): Set Prefix SID to interface %s ",
+ __func__, oi->ifp->name);
/* Complete SRDB if the interface belongs to a Prefix */
if (OspfEXT.enabled)
- ospf_sr_update_prefix(oi->ifp, oi->address);
+ ospf_sr_update_local_prefix(oi->ifp, oi->address);
} else {
/* Determine if interface is related to Adj. or LAN Adj. SID */
if (oi->state == ISM_DR)
* Note: Adjacency SID information are completed when ospf
* adjacency become up see ospf_ext_link_nsm_change()
*/
- zlog_debug("EXT (%s): Set %sAdjacency SID for interface %s ",
- __func__, exti->stype == ADJ_SID ? "" : "LAN-",
- oi->ifp->name);
+ osr_debug("EXT (%s): Set %sAdjacency SID for interface %s ",
+ __func__, exti->stype == ADJ_SID ? "" : "LAN-",
+ oi->ifp->name);
}
}
{
struct ospf_interface *oi = nbr->oi;
struct ext_itf *exti;
- uint32_t label;
- /* Process Neighbor only when its state is NSM Full */
- if (nbr->state != NSM_Full)
+ /* Process Link only when neighbor old or new state is NSM Full */
+ if (nbr->state != NSM_Full && old_status != NSM_Full)
return;
/* Get interface information for Segment Routing */
return;
}
+ /* Check that we have a valid area and ospf context */
+ if (oi->area == NULL || oi->area->ospf == NULL) {
+ flog_warn(EC_OSPF_EXT_LSA_UNEXPECTED,
+ "EXT (%s): Cannot refer to OSPF from OI(%s)",
+ __func__, IF_NAME(oi));
+ return;
+ }
+
+ /* Remove Extended Link if Neighbor State goes Down or Deleted */
+ if (nbr->state == NSM_Down || nbr->state == NSM_Deleted) {
+ ospf_ext_link_delete_adj_sid(exti);
+ if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED))
+ ospf_ext_link_lsa_schedule(exti, FLUSH_THIS_LSA);
+ exti->flags = EXT_LPFLG_LSA_INACTIVE;
+ return;
+ }
+
+ /* Keep Area information in combination with SR info. */
+ exti->area = oi->area;
+
/* Process only Adjacency/LAN SID */
if (exti->stype == PREF_SID)
return;
set_ext_link(exti, OSPF_IFTYPE_POINTOPOINT, nbr->router_id,
oi->address->u.prefix4);
- /* Set Extended Link Adjacency SubTLVs, backup first */
- label = get_ext_link_label_value();
- set_adj_sid(exti, true, label, SID_LABEL);
- label = get_ext_link_label_value();
- set_adj_sid(exti, false, label, SID_LABEL);
/* And Remote Interface address */
set_rmt_itf_addr(exti, nbr->address.u.prefix4);
set_ext_link(exti, OSPF_IFTYPE_BROADCAST, DR(oi),
oi->address->u.prefix4);
- /* Set Extended Link Adjacency SubTLVs, backup first */
- label = get_ext_link_label_value();
- set_lan_adj_sid(exti, true, label, SID_LABEL, nbr->router_id);
- label = get_ext_link_label_value();
- set_lan_adj_sid(exti, false, label, SID_LABEL, nbr->router_id);
+ /* Set Neighbor ID */
+ exti->lan_sid[0].neighbor_id = nbr->router_id;
+ exti->lan_sid[1].neighbor_id = nbr->router_id;
break;
set_ext_link(exti, OSPF_IFTYPE_BROADCAST, DR(oi),
oi->address->u.prefix4);
- /* Set Extended Link Adjacency SubTLVs, backup first */
- label = get_ext_link_label_value();
- set_adj_sid(exti, true, label, SID_LABEL);
- label = get_ext_link_label_value();
- set_adj_sid(exti, false, label, SID_LABEL);
-
break;
default:
+ if (CHECK_FLAG(exti->flags, EXT_LPFLG_FIB_ENTRY_SET))
+ ospf_ext_link_delete_adj_sid(exti);
if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED))
ospf_ext_link_lsa_schedule(exti, FLUSH_THIS_LSA);
exti->flags = EXT_LPFLG_LSA_INACTIVE;
return;
}
- if (IS_DEBUG_OSPF_SR)
- zlog_debug(
- "EXT (%s): Complete %sAdjacency SID for interface %s ",
- __func__, exti->stype == ADJ_SID ? "" : "LAN-",
- oi->ifp->name);
-
- /* flood this links params if everything is ok */
SET_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE);
+
if (OspfEXT.enabled) {
+ osr_debug("EXT (%s): Set %sAdjacency SID for interface %s ",
+ __func__, exti->stype == ADJ_SID ? "" : "LAN-",
+ oi->ifp->name);
+
+ /* Update (LAN)Adjacency SID */
+ ospf_ext_link_update_adj_sid(exti);
+
+ /* flood this links params if everything is ok */
if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED))
ospf_ext_link_lsa_schedule(exti, REFRESH_THIS_LSA);
else
!= OPAQUE_TYPE_EXTENDED_LINK_LSA)
return 0;
+ /* Check if it is not my LSA */
+ if (IS_LSA_SELF(lsa))
+ return 0;
+
/* Check if Extended is enable */
if (!OspfEXT.enabled)
return 0;
/* Set opaque-LSA header fields. */
lsa_header_set(s, options, lsa_type, lsa_id, router_id);
- if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
- zlog_debug(
- "EXT (%s): LSA[Type%u:%s]: Create an Opaque-LSA "
- "Extended Prefix Opaque LSA instance",
- __func__, lsa_type, inet_ntoa(lsa_id));
-
+ osr_debug(
+ "EXT (%s): LSA[Type%u:%pI4]: Create an Opaque-LSA Extended Prefix Opaque LSA instance",
+ __func__, lsa_type, &lsa_id);
/* Set opaque-LSA body fields. */
ospf_ext_pref_lsa_body_set(s, exti);
tmp = SET_OPAQUE_LSID(OPAQUE_TYPE_EXTENDED_LINK_LSA, exti->instance);
lsa_id.s_addr = htonl(tmp);
- if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
- zlog_debug(
- "EXT (%s) LSA[Type%u:%s]: Create an Opaque-LSA "
- "Extended Link Opaque LSA instance",
- __func__, lsa_type, inet_ntoa(lsa_id));
+ osr_debug(
+ "EXT (%s) LSA[Type%u:%pI4]: Create an Opaque-LSA Extended Link Opaque LSA instance",
+ __func__, lsa_type, &lsa_id);
/* Set opaque-LSA header fields. */
lsa_header_set(s, options, lsa_type, lsa_id, area->ospf->router_id);
/* Flood new LSA through area. */
ospf_flood_through_area(area, NULL /*nbr */, new);
- if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
- char area_id[INET_ADDRSTRLEN];
-
- inet_ntop(AF_INET, &area->area_id, area_id, sizeof(area_id));
- zlog_debug(
- "EXT (%s): LSA[Type%u:%s]: Originate Opaque-LSA "
- "Extended Prefix Opaque LSA: Area(%s), Link(%s)",
- __func__, new->data->type, inet_ntoa(new->data->id),
- area_id, exti->ifp->name);
+ osr_debug(
+ "EXT (%s): LSA[Type%u:%pI4]: Originate Opaque-LSAExtended Prefix Opaque LSA: Area(%pI4), Link(%s)",
+ __func__, new->data->type, &new->data->id,
+ &area->area_id, exti->ifp->name);
+ if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
ospf_lsa_header_dump(new->data);
- }
rc = 0;
/* Flood new LSA through area. */
ospf_flood_through_area(area, NULL /*nbr */, new);
- if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
- char area_id[INET_ADDRSTRLEN];
-
- inet_ntop(AF_INET, &area->area_id, area_id, sizeof(area_id));
- zlog_debug(
- "EXT (%s): LSA[Type%u:%s]: Originate Opaque-LSA "
- "Extended Link Opaque LSA: Area(%s), Link(%s)",
- __func__, new->data->type, inet_ntoa(new->data->id),
- area_id, exti->ifp->name);
+ osr_debug(
+ "EXT (%s): LSA[Type%u:%pI4]: Originate Opaque-LSA Extended Link Opaque LSA: Area(%pI4), Link(%s)",
+ __func__, new->data->type, &new->data->id,
+ &area->area_id, exti->ifp->name);
+ if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
ospf_lsa_header_dump(new->data);
- }
rc = 0;
if (!OspfEXT.enabled) {
zlog_info(
- "EXT (%s): Segment Routing "
- "functionality is Disabled now",
+ "EXT (%s): Segment Routing functionality is Disabled now",
__func__);
rc = 0; /* This is not an error case. */
return rc;
}
- if (IS_DEBUG_OSPF_SR)
- zlog_debug("EXT (%s): Start Originate Prefix LSA for area %s",
- __func__, inet_ntoa(area->area_id));
+ osr_debug("EXT (%s): Start Originate Prefix LSA for area %pI4",
+ __func__, &area->area_id);
/* Check if Extended Prefix Opaque LSA is already engaged */
for (ALL_LIST_ELEMENTS_RO(OspfEXT.iflist, node, exti)) {
}
/* Ok, let's try to originate an LSA */
- if (IS_DEBUG_OSPF_SR)
- zlog_debug(
- "EXT (%s): Let's finally reoriginate the "
- "LSA 7.0.0.%u for Itf %s",
- __func__, exti->instance,
- exti->ifp ? exti->ifp->name : "");
+ osr_debug(
+ "EXT (%s): Let's finally re-originate the LSA 7.0.0.%u for Itf %s", __func__, exti->instance,
+ exti->ifp ? exti->ifp->name : "");
ospf_ext_pref_lsa_originate1(area, exti);
}
if (!OspfEXT.enabled) {
zlog_info(
- "EXT (%s): Segment Routing "
- "functionality is Disabled now",
+ "EXT (%s): Segment Routing functionality is Disabled now",
__func__);
rc = 0; /* This is not an error case. */
return rc;
if (exti->stype == PREF_SID)
continue;
+ /* Skip Inactive Extended Link */
+ if (!CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE))
+ continue;
+
/* Process only Extended Link with valid Area ID */
if ((exti->area == NULL)
|| (!IPV4_ADDR_SAME(&exti->area->area_id, &area->area_id)))
continue;
- /* Skip Extended Link which are not Active */
- if (!CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE))
- continue;
-
/* Check if LSA not already engaged */
if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED)) {
if (CHECK_FLAG(exti->flags,
}
/* Ok, let's try to originate an LSA */
- if (IS_DEBUG_OSPF_SR)
- zlog_debug(
- "EXT (%s): Let's finally reoriginate the "
- "LSA 8.0.0.%u for Itf %s through the Area %s",
- __func__, exti->instance,
- exti->ifp ? exti->ifp->name : "-",
- inet_ntoa(area->area_id));
+ osr_debug(
+ "EXT (%s): Let's finally reoriginate the LSA 8.0.0.%u for Itf %s through the Area %pI4", __func__,
+ exti->instance, exti->ifp ? exti->ifp->name : "-",
+ &area->area_id);
ospf_ext_link_lsa_originate1(area, exti);
}
* It seems a slip among routers in the routing domain.
*/
zlog_info(
- "EXT (%s): Segment Routing functionality is "
- "Disabled",
+ "EXT (%s): Segment Routing functionality is Disabled",
__func__);
/* Flush it anyway. */
lsa->data->ls_age = htons(OSPF_LSA_MAXAGE);
ospf_flood_through_area(area, NULL /*nbr */, new);
/* Debug logging. */
- if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
- zlog_debug(
- "EXT (%s): LSA[Type%u:%s] Refresh Extended Prefix LSA",
- __func__, new->data->type, inet_ntoa(new->data->id));
+ osr_debug("EXT (%s): LSA[Type%u:%pI4] Refresh Extended Prefix LSA",
+ __func__, new->data->type, &new->data->id);
+ if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
ospf_lsa_header_dump(new->data);
- }
+
return new;
}
ospf_flood_through_area(area, NULL /*nbr */, new);
/* Debug logging. */
- if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
- zlog_debug(
- "EXT (%s): LSA[Type%u:%s]: Refresh Extended Link LSA",
- __func__, new->data->type, inet_ntoa(new->data->id));
+ osr_debug("EXT (%s): LSA[Type%u:%pI4]: Refresh Extended Link LSA",
+ __func__, new->data->type, &new->data->id);
+ if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
ospf_lsa_header_dump(new->data);
- }
return new;
}
if (!(CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE)))
return;
- zlog_debug("EXT (%s): Schedule %s%s%s LSA for interface %s", __func__,
- opcode == REORIGINATE_THIS_LSA ? "Re-Originate" : "",
- opcode == REFRESH_THIS_LSA ? "Refresh" : "",
- opcode == FLUSH_THIS_LSA ? "Flush" : "",
- exti->ifp ? exti->ifp->name : "-");
+ osr_debug("EXT (%s): Schedule %s%s%s LSA for interface %s", __func__,
+ opcode == REORIGINATE_THIS_LSA ? "Re-Originate" : "",
+ opcode == REFRESH_THIS_LSA ? "Refresh" : "",
+ opcode == FLUSH_THIS_LSA ? "Flush" : "",
+ exti->ifp ? exti->ifp->name : "-");
/* Verify Area */
if (exti->area == NULL) {
- if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
- zlog_debug(
- "EXT (%s): Area is not yet set. Try to use Backbone Area",
- __func__);
+ osr_debug(
+ "EXT (%s): Area is not yet set. Try to use Backbone Area",
+ __func__);
top = ospf_lookup_by_vrf_id(VRF_DEFAULT);
struct in_addr backbone = {.s_addr = INADDR_ANY};
if (!(CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ACTIVE)))
return;
- zlog_debug("EXT (%s): Schedule %s%s%s LSA for interface %s", __func__,
- opcode == REORIGINATE_THIS_LSA ? "Re-Originate" : "",
- opcode == REFRESH_THIS_LSA ? "Refresh" : "",
- opcode == FLUSH_THIS_LSA ? "Flush" : "",
- exti->ifp ? exti->ifp->name : "-");
+ osr_debug("EXT (%s): Schedule %s%s%s LSA for interface %s", __func__,
+ opcode == REORIGINATE_THIS_LSA ? "Re-Originate" : "",
+ opcode == REFRESH_THIS_LSA ? "Refresh" : "",
+ opcode == FLUSH_THIS_LSA ? "Flush" : "",
+ exti->ifp ? exti->ifp->name : "-");
/* Verify Area */
if (exti->area == NULL) {
- if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
- zlog_debug(
- "EXT (%s): Area is not yet set. Try to use Backbone Area",
- __func__);
+ osr_debug(
+ "EXT (%s): Area is not yet set. Try to use Backbone Area",
+ __func__);
top = ospf_lookup_by_vrf_id(VRF_DEFAULT);
struct in_addr backbone = {.s_addr = INADDR_ANY};
top = (struct ext_subtlv_rmt_itf_addr *)tlvh;
vty_out(vty,
- " Remote Interface Address Sub-TLV: Length %u\n "
- "Address: %s\n",
+ " Remote Interface Address Sub-TLV: Length %u\n Address: %s\n",
ntohs(top->header.length), inet_ntoa(top->value));
return TLV_SIZE(tlvh);
struct ext_subtlv_adj_sid *top = (struct ext_subtlv_adj_sid *)tlvh;
vty_out(vty,
- " Adj-SID Sub-TLV: Length %u\n\tFlags: "
- "0x%x\n\tMT-ID:0x%x\n\tWeight: 0x%x\n\t%s: %u\n",
+ " Adj-SID Sub-TLV: Length %u\n\tFlags: 0x%x\n\tMT-ID:0x%x\n\tWeight: 0x%x\n\t%s: %u\n",
ntohs(top->header.length), top->flags, top->mtid, top->weight,
CHECK_FLAG(top->flags, EXT_SUBTLV_LINK_ADJ_SID_VFLG) ? "Label"
: "Index",
(struct ext_subtlv_lan_adj_sid *)tlvh;
vty_out(vty,
- " LAN-Adj-SID Sub-TLV: Length %u\n\tFlags: "
- "0x%x\n\tMT-ID:0x%x\n\tWeight: 0x%x\n\tNeighbor ID: "
- "%s\n\t%s: %u\n",
+ " LAN-Adj-SID Sub-TLV: Length %u\n\tFlags: 0x%x\n\tMT-ID:0x%x\n\tWeight: 0x%x\n\tNeighbor ID: %s\n\t%s: %u\n",
ntohs(top->header.length), top->flags, top->mtid, top->weight,
inet_ntoa(top->neighbor_id),
CHECK_FLAG(top->flags, EXT_SUBTLV_LINK_ADJ_SID_VFLG) ? "Label"
(struct ext_subtlv_prefix_sid *)tlvh;
vty_out(vty,
- " Prefix SID Sub-TLV: Length %u\n\tAlgorithm: "
- "%u\n\tFlags: 0x%x\n\tMT-ID:0x%x\n\t%s: %u\n",
+ " Prefix SID Sub-TLV: Length %u\n\tAlgorithm: %u\n\tFlags: 0x%x\n\tMT-ID:0x%x\n\t%s: %u\n",
ntohs(top->header.length), top->algorithm, top->flags,
top->mtid,
CHECK_FLAG(top->flags, EXT_SUBTLV_PREFIX_SID_VFLG) ? "Label"