summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_ri.c
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2018-03-06 20:02:52 +0100
committerLou Berger <lberger@labn.net>2018-03-06 20:04:32 +0100
commit996c93142d3abfab0f6d6c800474e22a8cfbdbc5 (patch)
tree2b28846d256c84cf7b7f1a8988fb3267c8611722 /ospfd/ospf_ri.c
parentbgpd: another change to keep indent.py happy (diff)
downloadfrr-996c93142d3abfab0f6d6c800474e22a8cfbdbc5.tar.xz
frr-996c93142d3abfab0f6d6c800474e22a8cfbdbc5.zip
*: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'ospfd/ospf_ri.c')
-rw-r--r--ospfd/ospf_ri.c42
1 files changed, 16 insertions, 26 deletions
diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c
index 7c7a6fd79..e1d3e925c 100644
--- a/ospfd/ospf_ri.c
+++ b/ospfd/ospf_ri.c
@@ -176,15 +176,12 @@ static int ospf_router_info_register(u_int8_t scope)
scope, OPAQUE_TYPE_ROUTER_INFORMATION_LSA,
NULL, /* new interface */
NULL, /* del interface */
- ospf_router_info_ism_change,
- ospf_router_info_nsm_change,
+ ospf_router_info_ism_change, ospf_router_info_nsm_change,
ospf_router_info_config_write_router,
NULL, /* Config. write interface */
NULL, /* Config. write debug */
- ospf_router_info_show_info,
- ospf_router_info_lsa_originate,
- ospf_router_info_lsa_refresh,
- ospf_router_info_lsa_update,
+ ospf_router_info_show_info, ospf_router_info_lsa_originate,
+ ospf_router_info_lsa_refresh, ospf_router_info_lsa_update,
NULL); /* del_lsa_hook */
if (rc != 0) {
@@ -465,7 +462,6 @@ static void set_sr_algorithm(uint8_t algo)
/* Set TLV type and length == only 1 Algorithm */
TLV_TYPE(OspfRI.sr_info.algo) = htons(RI_SR_TLV_SR_ALGORITHM);
TLV_LEN(OspfRI.sr_info.algo) = htons(sizeof(uint8_t));
-
}
/* unset Aglogithm SubTLV */
@@ -478,7 +474,6 @@ static void unset_sr_algorithm(uint8_t algo)
/* Unset TLV type and length */
TLV_TYPE(OspfRI.sr_info.algo) = htons(0);
TLV_LEN(OspfRI.sr_info.algo) = htons(0);
-
}
/* Segment Routing Global Block SubTLV - section 3.2 */
@@ -494,7 +489,6 @@ static void set_sr_sid_label_range(struct sr_srgb srgb)
TLV_TYPE(OspfRI.sr_info.range.lower) = htons(SUBTLV_SID_LABEL);
TLV_LEN(OspfRI.sr_info.range.lower) = htons(SID_RANGE_LABEL_LENGTH);
OspfRI.sr_info.range.lower.value = htonl(SET_LABEL(srgb.lower_bound));
-
}
/* Unset this SRGB SubTLV */
@@ -505,7 +499,6 @@ static void unset_sr_sid_label_range(void)
TLV_LEN(OspfRI.sr_info.range) = htons(0);
TLV_TYPE(OspfRI.sr_info.range.lower) = htons(0);
TLV_LEN(OspfRI.sr_info.range.lower) = htons(0);
-
}
/* Set Maximum Stack Depth for this router */
@@ -514,7 +507,6 @@ static void set_sr_node_msd(uint8_t msd)
TLV_TYPE(OspfRI.sr_info.msd) = htons(RI_SR_TLV_NODE_MSD);
TLV_LEN(OspfRI.sr_info.msd) = htons(sizeof(uint32_t));
OspfRI.sr_info.msd.value = msd;
-
}
/* Unset this router MSD */
@@ -522,7 +514,6 @@ static void unset_sr_node_msd(void)
{
TLV_TYPE(OspfRI.sr_info.msd) = htons(0);
TLV_LEN(OspfRI.sr_info.msd) = htons(0);
-
}
static void unset_param(struct tlv_header *tlv)
@@ -621,7 +612,7 @@ void ospf_router_info_update_sr(bool enable, struct sr_srgb srgb, uint8_t msd)
if (IS_DEBUG_OSPF_SR)
zlog_debug("RI-> %s Routing Information for Segment Routing",
- enable ? "Enable" : "Disable");
+ enable ? "Enable" : "Disable");
/* Unset or Set SR parameters */
if (!enable) {
@@ -709,7 +700,7 @@ static void ospf_router_info_lsa_body_set(struct stream *s)
if (OspfRI.pce_info.enabled) {
/* Compute PCE Info header first */
- set_pce_header (&OspfRI.pce_info);
+ set_pce_header(&OspfRI.pce_info);
/* Build PCE TLV */
build_tlv_header(s, &OspfRI.pce_info.pce_header.header);
@@ -994,10 +985,12 @@ static void ospf_router_info_lsa_schedule(enum lsa_opcode opcode)
opcode == FLUSH_THIS_LSA ? "Flush" : "");
/* Check LSA flags state coherence */
- if (!CHECK_FLAG(OspfRI.flags, RIFLG_LSA_ENGAGED) && (opcode != REORIGINATE_THIS_LSA))
+ if (!CHECK_FLAG(OspfRI.flags, RIFLG_LSA_ENGAGED)
+ && (opcode != REORIGINATE_THIS_LSA))
return;
- if (CHECK_FLAG(OspfRI.flags, RIFLG_LSA_ENGAGED) && (opcode == REORIGINATE_THIS_LSA))
+ if (CHECK_FLAG(OspfRI.flags, RIFLG_LSA_ENGAGED)
+ && (opcode == REORIGINATE_THIS_LSA))
opcode = REFRESH_THIS_LSA;
top = ospf_lookup_by_vrf_id(VRF_DEFAULT);
@@ -1057,8 +1050,8 @@ static int ospf_router_info_lsa_update(struct ospf_lsa *lsa)
return 0;
/* Process only Router Information LSA */
- if (GET_OPAQUE_TYPE(ntohl(lsa->data->id.s_addr)) !=
- OPAQUE_TYPE_ROUTER_INFORMATION_LSA)
+ if (GET_OPAQUE_TYPE(ntohl(lsa->data->id.s_addr))
+ != OPAQUE_TYPE_ROUTER_INFORMATION_LSA)
return 0;
/* Check if it is not my LSA */
@@ -1082,8 +1075,7 @@ static int ospf_router_info_lsa_update(struct ospf_lsa *lsa)
* Followings are vty session control functions.
*------------------------------------------------------------------------*/
-static u_int16_t show_vty_router_cap(struct vty *vty,
- struct tlv_header *tlvh)
+static u_int16_t show_vty_router_cap(struct vty *vty, struct tlv_header *tlvh)
{
struct ri_tlv_router_cap *top = (struct ri_tlv_router_cap *)tlvh;
@@ -1200,8 +1192,7 @@ static u_int16_t show_vty_pce_subtlv_cap_flag(struct vty *vty,
return TLV_SIZE(tlvh);
}
-static u_int16_t show_vty_unknown_tlv(struct vty *vty,
- struct tlv_header *tlvh)
+static u_int16_t show_vty_unknown_tlv(struct vty *vty, struct tlv_header *tlvh)
{
if (vty != NULL)
vty_out(vty, " Unknown TLV: [type(0x%x), length(0x%x)]\n",
@@ -1496,8 +1487,8 @@ DEFUN (router_info,
/* Refresh RI LSA if already engaged */
if (CHECK_FLAG(OspfRI.flags, RIFLG_LSA_ENGAGED)) {
- zlog_debug ("RI-> Refresh LSA following configuration");
- ospf_router_info_lsa_schedule (REFRESH_THIS_LSA);
+ zlog_debug("RI-> Refresh LSA following configuration");
+ ospf_router_info_lsa_schedule(REFRESH_THIS_LSA);
} else {
zlog_debug("RI-> Initial origination following configuration");
ospf_router_info_lsa_schedule(REORIGINATE_THIS_LSA);
@@ -1891,8 +1882,7 @@ DEFUN (show_ip_opsf_router_info_pce,
&pce->pce_cap_flag.header);
} else {
- vty_out(vty,
- " PCE info is disabled on this router\n");
+ vty_out(vty, " PCE info is disabled on this router\n");
}
return CMD_SUCCESS;