summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_apiserver.c5
-rw-r--r--ospfd/ospf_asbr.c10
-rw-r--r--ospfd/ospf_ext.c34
-rw-r--r--ospfd/ospf_neighbor.c4
-rw-r--r--ospfd/ospf_network.c26
-rw-r--r--ospfd/ospf_nsm.c19
-rw-r--r--ospfd/ospf_ri.c8
-rw-r--r--ospfd/ospf_sr.c4
-rw-r--r--ospfd/ospf_te.c72
-rw-r--r--ospfd/ospfd.c7
10 files changed, 106 insertions, 83 deletions
diff --git a/ospfd/ospf_apiserver.c b/ospfd/ospf_apiserver.c
index 4ae57793d..d4a8a266c 100644
--- a/ospfd/ospf_apiserver.c
+++ b/ospfd/ospf_apiserver.c
@@ -153,8 +153,9 @@ int ospf_apiserver_init(void)
NULL, /* ospf_apiserver_lsa_refresher */
ospf_apiserver_lsa_update, ospf_apiserver_lsa_delete);
if (rc != 0) {
- flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
- "ospf_apiserver_init: Failed to register opaque type [0/0]");
+ flog_warn(
+ OSPF_WARN_OPAQUE_REGISTRATION,
+ "ospf_apiserver_init: Failed to register opaque type [0/0]");
}
rc = 0;
diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c
index da5f485ef..ba2e04bf7 100644
--- a/ospfd/ospf_asbr.c
+++ b/ospfd/ospf_asbr.c
@@ -136,11 +136,11 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance,
inet_ntop(AF_INET, (void *)&nexthop.s_addr, inetbuf,
INET6_BUFSIZ);
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
- zlog_debug(
- "Redistribute[%s][%d][%u]: %s/%d discarding old info with NH %s.",
- ospf_redist_string(type), instance,
- ospf->vrf_id, inet_ntoa(p.prefix), p.prefixlen,
- inetbuf);
+ zlog_debug(
+ "Redistribute[%s][%d][%u]: %s/%d discarding old info with NH %s.",
+ ospf_redist_string(type), instance,
+ ospf->vrf_id, inet_ntoa(p.prefix),
+ p.prefixlen, inetbuf);
XFREE(MTYPE_OSPF_EXTERNAL_INFO, rn->info);
rn->info = NULL;
}
diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c
index 018ca5c0f..1aab61168 100644
--- a/ospfd/ospf_ext.c
+++ b/ospfd/ospf_ext.c
@@ -760,8 +760,8 @@ static int ospf_ext_link_lsa_update(struct ospf_lsa *lsa)
{
/* Sanity Check */
if (lsa == NULL) {
- flog_warn(OSPF_WARN_LSA_NULL,
- "EXT (%s): Abort! LSA is NULL", __func__);
+ flog_warn(OSPF_WARN_LSA_NULL, "EXT (%s): Abort! LSA is NULL",
+ __func__);
return -1;
}
@@ -794,8 +794,8 @@ static int ospf_ext_pref_lsa_update(struct ospf_lsa *lsa)
/* Sanity Check */
if (lsa == NULL) {
- flog_warn(OSPF_WARN_LSA_NULL,
- "EXT (%s): Abort! LSA is NULL", __func__);
+ flog_warn(OSPF_WARN_LSA_NULL, "EXT (%s): Abort! LSA is NULL",
+ __func__);
return -1;
}
@@ -1190,8 +1190,9 @@ static int ospf_ext_pref_lsa_originate(void *arg)
if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED)) {
if (CHECK_FLAG(exti->flags,
EXT_LPFLG_LSA_FORCED_REFRESH)) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
- "EXT (%s): Refresh instead of Originate",
+ flog_warn(
+ OSPF_WARN_EXT_LSA_UNEXPECTED,
+ "EXT (%s): Refresh instead of Originate",
__func__);
UNSET_FLAG(exti->flags,
EXT_LPFLG_LSA_FORCED_REFRESH);
@@ -1247,9 +1248,10 @@ static int ospf_ext_link_lsa_originate(void *arg)
if (CHECK_FLAG(exti->flags, EXT_LPFLG_LSA_ENGAGED)) {
if (CHECK_FLAG(exti->flags,
EXT_LPFLG_LSA_FORCED_REFRESH)) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
- "EXT (%s): Refresh instead of Originate",
- __func__);
+ flog_warn(
+ OSPF_WARN_EXT_LSA_UNEXPECTED,
+ "EXT (%s): Refresh instead of Originate",
+ __func__);
UNSET_FLAG(exti->flags,
EXT_LPFLG_LSA_FORCED_REFRESH);
ospf_ext_link_lsa_schedule(exti,
@@ -1467,9 +1469,10 @@ static void ospf_ext_pref_lsa_schedule(struct ext_itf *exti,
/* Set LSA header information */
if (exti->area == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
- "EXT (%s): Flooding is Area scope but area is not yet set",
- __func__);
+ flog_warn(
+ OSPF_WARN_EXT_LSA_UNEXPECTED,
+ "EXT (%s): Flooding is Area scope but area is not yet set",
+ __func__);
if (OspfEXT.area == NULL) {
top = ospf_lookup_by_vrf_id(VRF_DEFAULT);
OspfEXT.area = ospf_area_lookup_by_area_id(
@@ -1527,9 +1530,10 @@ static void ospf_ext_link_lsa_schedule(struct ext_itf *exti,
/* Set LSA header information */
if (exti->area == NULL) {
- flog_warn(OSPF_WARN_EXT_LSA_UNEXPECTED,
- "EXT (%s): Flooding is Area scope but area is not yet set",
- __func__);
+ flog_warn(
+ OSPF_WARN_EXT_LSA_UNEXPECTED,
+ "EXT (%s): Flooding is Area scope but area is not yet set",
+ __func__);
if (OspfEXT.area == NULL) {
top = ospf_lookup_by_vrf_id(VRF_DEFAULT);
OspfEXT.area = ospf_area_lookup_by_area_id(
diff --git a/ospfd/ospf_neighbor.c b/ospfd/ospf_neighbor.c
index a0fe1c53d..a58bd93b6 100644
--- a/ospfd/ospf_neighbor.c
+++ b/ospfd/ospf_neighbor.c
@@ -271,8 +271,8 @@ void ospf_nbr_add_self(struct ospf_interface *oi, struct in_addr router_id)
/* There is already pseudo neighbor. */
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "router_id %s already present in neighbor table. node refcount %u",
- inet_ntoa(router_id), rn->lock);
+ "router_id %s already present in neighbor table. node refcount %u",
+ inet_ntoa(router_id), rn->lock);
route_unlock_node(rn);
} else
rn->info = oi->nbr_self;
diff --git a/ospfd/ospf_network.c b/ospfd/ospf_network.c
index d893a0210..ed11f4535 100644
--- a/ospfd/ospf_network.c
+++ b/ospfd/ospf_network.c
@@ -51,12 +51,13 @@ int ospf_if_add_allspfrouters(struct ospf *top, struct prefix *p,
p->u.prefix4, htonl(OSPF_ALLSPFROUTERS),
ifindex);
if (ret < 0)
- flog_err(LIB_ERR_SOCKET,
- "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, "
- "ifindex %u, AllSPFRouters): %s; perhaps a kernel limit "
- "on # of multicast group memberships has been exceeded?",
- top->fd, inet_ntoa(p->u.prefix4), ifindex,
- safe_strerror(errno));
+ flog_err(
+ LIB_ERR_SOCKET,
+ "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, "
+ "ifindex %u, AllSPFRouters): %s; perhaps a kernel limit "
+ "on # of multicast group memberships has been exceeded?",
+ top->fd, inet_ntoa(p->u.prefix4), ifindex,
+ safe_strerror(errno));
else {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
@@ -101,12 +102,13 @@ int ospf_if_add_alldrouters(struct ospf *top, struct prefix *p,
p->u.prefix4, htonl(OSPF_ALLDROUTERS),
ifindex);
if (ret < 0)
- flog_err(LIB_ERR_SOCKET,
- "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, "
- "ifindex %u, AllDRouters): %s; perhaps a kernel limit "
- "on # of multicast group memberships has been exceeded?",
- top->fd, inet_ntoa(p->u.prefix4), ifindex,
- safe_strerror(errno));
+ flog_err(
+ LIB_ERR_SOCKET,
+ "can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, "
+ "ifindex %u, AllDRouters): %s; perhaps a kernel limit "
+ "on # of multicast group memberships has been exceeded?",
+ top->fd, inet_ntoa(p->u.prefix4), ifindex,
+ safe_strerror(errno));
else
zlog_debug(
"interface %s [%u] join AllDRouters Multicast group.",
diff --git a/ospfd/ospf_nsm.c b/ospfd/ospf_nsm.c
index 83183071c..985e2efc9 100644
--- a/ospfd/ospf_nsm.c
+++ b/ospfd/ospf_nsm.c
@@ -796,15 +796,16 @@ int ospf_nsm_event(struct thread *thread)
* not
* try set next_state.
*/
- flog_err(OSPF_ERR_FSM_INVALID_STATE,
- "NSM[%s:%s]: %s (%s): "
- "Warning: action tried to change next_state to %s",
- IF_NAME(nbr->oi), inet_ntoa(nbr->router_id),
- lookup_msg(ospf_nsm_state_msg, nbr->state,
- NULL),
- ospf_nsm_event_str[event],
- lookup_msg(ospf_nsm_state_msg, func_state,
- NULL));
+ flog_err(
+ OSPF_ERR_FSM_INVALID_STATE,
+ "NSM[%s:%s]: %s (%s): "
+ "Warning: action tried to change next_state to %s",
+ IF_NAME(nbr->oi), inet_ntoa(nbr->router_id),
+ lookup_msg(ospf_nsm_state_msg, nbr->state,
+ NULL),
+ ospf_nsm_event_str[event],
+ lookup_msg(ospf_nsm_state_msg, func_state,
+ NULL));
}
}
diff --git a/ospfd/ospf_ri.c b/ospfd/ospf_ri.c
index 37d18767e..974822ba8 100644
--- a/ospfd/ospf_ri.c
+++ b/ospfd/ospf_ri.c
@@ -186,8 +186,9 @@ static int ospf_router_info_register(uint8_t scope)
NULL); /* del_lsa_hook */
if (rc != 0) {
- flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
- "ospf_router_info_init: Failed to register functions");
+ flog_warn(
+ OSPF_WARN_OPAQUE_REGISTRATION,
+ "ospf_router_info_init: Failed to register functions");
return rc;
}
@@ -201,7 +202,8 @@ static int ospf_router_info_unregister()
if ((OspfRI.scope != OSPF_OPAQUE_AS_LSA)
&& (OspfRI.scope != OSPF_OPAQUE_AREA_LSA)) {
- assert("Unable to unregister Router Info functions: Wrong scope!" == NULL);
+ assert("Unable to unregister Router Info functions: Wrong scope!"
+ == NULL);
return -1;
}
diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c
index 5ee56838a..2f8ff9909 100644
--- a/ospfd/ospf_sr.c
+++ b/ospfd/ospf_sr.c
@@ -818,8 +818,8 @@ static struct sr_prefix *get_ext_prefix_sid(struct tlv_header *tlvh)
psid = (struct ext_subtlv_prefix_sid *)sub_tlvh;
if (psid->algorithm != SR_ALGORITHM_SPF) {
flog_err(OSPF_ERR_INVALID_ALGORITHM,
- "SR (%s): Unsupported Algorithm",
- __func__);
+ "SR (%s): Unsupported Algorithm",
+ __func__);
XFREE(MTYPE_OSPF_SR_PARAMS, srp);
return NULL;
}
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index 12325f4fb..f3be77195 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -103,8 +103,9 @@ int ospf_mpls_te_init(void)
ospf_mpls_te_lsa_refresh, NULL, /* ospf_mpls_te_new_lsa_hook */
NULL /* ospf_mpls_te_del_lsa_hook */);
if (rc != 0) {
- flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
- "ospf_mpls_te_init: Failed to register Traffic Engineering functions");
+ flog_warn(
+ OSPF_WARN_OPAQUE_REGISTRATION,
+ "ospf_mpls_te_init: Failed to register Traffic Engineering functions");
return rc;
}
@@ -140,8 +141,9 @@ static int ospf_mpls_te_register(enum inter_as_mode mode)
ospf_mpls_te_lsa_refresh, NULL, NULL);
if (rc != 0) {
- flog_warn(OSPF_WARN_OPAQUE_REGISTRATION,
- "ospf_router_info_init: Failed to register Inter-AS functions");
+ flog_warn(
+ OSPF_WARN_OPAQUE_REGISTRATION,
+ "ospf_router_info_init: Failed to register Inter-AS functions");
return rc;
}
@@ -817,8 +819,9 @@ static int is_mandated_params_set(struct mpls_te_link *lp)
int rc = 0;
if (ntohs(OspfMplsTE.router_addr.header.type) == 0) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
- "MPLS-TE(is_mandated_params_set) Missing Router Address");
+ flog_warn(
+ OSPF_WARN_TE_UNEXPECTED,
+ "MPLS-TE(is_mandated_params_set) Missing Router Address");
return rc;
}
@@ -921,9 +924,10 @@ void ospf_mpls_te_update_if(struct interface *ifp)
/* Get Link context from interface */
if ((lp = lookup_linkparams_by_ifp(ifp)) == NULL) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
- "OSPF MPLS-TE Update: Did not find Link Parameters context for interface %s",
- ifp->name);
+ flog_warn(
+ OSPF_WARN_TE_UNEXPECTED,
+ "OSPF MPLS-TE Update: Did not find Link Parameters context for interface %s",
+ ifp->name);
return;
}
@@ -965,16 +969,18 @@ static void ospf_mpls_te_ism_change(struct ospf_interface *oi, int old_state)
struct mpls_te_link *lp;
if ((lp = lookup_linkparams_by_ifp(oi->ifp)) == NULL) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
- "ospf_mpls_te_ism_change: Cannot get linkparams from OI(%s)?",
- IF_NAME(oi));
+ flog_warn(
+ OSPF_WARN_TE_UNEXPECTED,
+ "ospf_mpls_te_ism_change: Cannot get linkparams from OI(%s)?",
+ IF_NAME(oi));
return;
}
if (oi->area == NULL || oi->area->ospf == NULL) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
- "ospf_mpls_te_ism_change: Cannot refer to OSPF from OI(%s)?",
- IF_NAME(oi));
+ flog_warn(
+ OSPF_WARN_TE_UNEXPECTED,
+ "ospf_mpls_te_ism_change: Cannot refer to OSPF from OI(%s)?",
+ IF_NAME(oi));
return;
}
#ifdef notyet
@@ -982,10 +988,11 @@ static void ospf_mpls_te_ism_change(struct ospf_interface *oi, int old_state)
&& !IPV4_ADDR_SAME(&lp->area->area_id, &oi->area->area_id))
|| (lp->area != NULL && oi->area == NULL)) {
/* How should we consider this case? */
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
- "MPLS-TE: Area for OI(%s) has changed to [%s], flush previous LSAs",
- IF_NAME(oi),
- oi->area ? inet_ntoa(oi->area->area_id) : "N/A");
+ flog_warn(
+ OSPF_WARN_TE_UNEXPECTED,
+ "MPLS-TE: Area for OI(%s) has changed to [%s], flush previous LSAs",
+ IF_NAME(oi),
+ oi->area ? inet_ntoa(oi->area->area_id) : "N/A");
ospf_mpls_te_lsa_schedule(lp, FLUSH_THIS_LSA);
}
#endif
@@ -1216,8 +1223,9 @@ static int ospf_mpls_te_lsa_originate1(struct ospf_area *area,
/* Create new Opaque-LSA/MPLS-TE instance. */
new = ospf_mpls_te_lsa_new(area->ospf, area, lp);
if (new == NULL) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
- "ospf_mpls_te_lsa_originate1: ospf_mpls_te_lsa_new() ?");
+ flog_warn(
+ OSPF_WARN_TE_UNEXPECTED,
+ "ospf_mpls_te_lsa_originate1: ospf_mpls_te_lsa_new() ?");
return rc;
}
@@ -1317,8 +1325,9 @@ static int ospf_mpls_te_lsa_originate2(struct ospf *top,
/* Create new Opaque-LSA/Inter-AS instance. */
new = ospf_mpls_te_lsa_new(top, NULL, lp);
if (new == NULL) {
- flog_warn(OSPF_WARN_LSA_UNEXPECTED,
- "ospf_mpls_te_lsa_originate2: ospf_router_info_lsa_new() ?");
+ flog_warn(
+ OSPF_WARN_LSA_UNEXPECTED,
+ "ospf_mpls_te_lsa_originate2: ospf_router_info_lsa_new() ?");
return rc;
}
new->vrf_id = top->vrf_id;
@@ -1380,9 +1389,10 @@ static int ospf_mpls_te_lsa_originate_as(void *arg)
}
if (!is_mandated_params_set(lp)) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
- "ospf_mpls_te_lsa_originate_as: Link(%s) lacks some mandated MPLS-TE parameters.",
- lp->ifp ? lp->ifp->name : "?");
+ flog_warn(
+ OSPF_WARN_TE_UNEXPECTED,
+ "ospf_mpls_te_lsa_originate_as: Link(%s) lacks some mandated MPLS-TE parameters.",
+ lp->ifp ? lp->ifp->name : "?");
continue;
}
@@ -1437,8 +1447,9 @@ static struct ospf_lsa *ospf_mpls_te_lsa_refresh(struct ospf_lsa *lsa)
/* Check if lp was not disable in the interval */
if (!CHECK_FLAG(lp->flags, LPFLG_LSA_ACTIVE)) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
- "ospf_mpls_te_lsa_refresh: lp was disabled: Flush it!");
+ flog_warn(
+ OSPF_WARN_TE_UNEXPECTED,
+ "ospf_mpls_te_lsa_refresh: lp was disabled: Flush it!");
lsa->data->ls_age =
htons(OSPF_LSA_MAXAGE); /* Flush it anyway. */
}
@@ -1522,8 +1533,9 @@ void ospf_mpls_te_lsa_schedule(struct mpls_te_link *lp, enum lsa_opcode opcode)
top, OspfMplsTE.interas_areaid);
/* Unable to set the area context. Abort! */
if (lp->area == NULL) {
- flog_warn(OSPF_WARN_TE_UNEXPECTED,
- "MPLS-TE(ospf_mpls_te_lsa_schedule) Area context is null. Abort !");
+ flog_warn(
+ OSPF_WARN_TE_UNEXPECTED,
+ "MPLS-TE(ospf_mpls_te_lsa_schedule) Area context is null. Abort !");
return;
}
tmp = SET_OPAQUE_LSID(OPAQUE_TYPE_INTER_AS_LSA,
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c
index d7406e4e1..a8535fa9c 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -324,9 +324,10 @@ static struct ospf *ospf_new(unsigned short instance, const char *name)
new->fd = -1;
if ((ospf_sock_init(new)) < 0) {
if (new->vrf_id != VRF_UNKNOWN)
- flog_err(LIB_ERR_SOCKET,
- "%s: ospf_sock_init is unable to open a socket",
- __func__);
+ flog_err(
+ LIB_ERR_SOCKET,
+ "%s: ospf_sock_init is unable to open a socket",
+ __func__);
return new;
}
thread_add_read(master, ospf_read, new, new->fd, &new->t_read);