nbr->t_inactivity = NULL;
if (IS_DEBUG_OSPF(nsm, NSM_TIMERS))
- zlog_debug("NSM[%s:%s]: Timer (Inactivity timer expire)",
- IF_NAME(nbr->oi), inet_ntoa(nbr->router_id));
+ zlog_debug("NSM[%s:%s:%s]: Timer (Inactivity timer expire)",
+ IF_NAME(nbr->oi), inet_ntoa(nbr->router_id),
+ ospf_get_name(nbr->oi->ospf));
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_InactivityTimer);
nbr->t_db_desc = NULL;
if (IS_DEBUG_OSPF(nsm, NSM_TIMERS))
- zlog_debug("NSM[%s:%s]: Timer (DD Retransmit timer expire)",
- IF_NAME(nbr->oi), inet_ntoa(nbr->src));
+ zlog_debug("NSM[%s:%s:%s]: Timer (DD Retransmit timer expire)",
+ IF_NAME(nbr->oi), inet_ntoa(nbr->src),
+ ospf_get_name(nbr->oi->ospf));
/* resent last send DD packet. */
assert(nbr->last_send);
case OSPF_OPAQUE_LINK_LSA:
/* Exclude type-9 LSAs that does not have the same "oi" with
* "nbr". */
- if (nbr->oi && ospf_if_exists(lsa->oi) != nbr->oi)
+ if (ospf_if_exists(lsa->oi) != nbr->oi)
return 0;
break;
case OSPF_OPAQUE_AREA_LSA:
if (IS_DEBUG_OSPF(nsm, NSM_EVENTS))
zlog_debug(
- "NSM[%s:%s]: Down (PollIntervalTimer scheduled)",
+ "NSM[%s:%s:%s]: Down (PollIntervalTimer scheduled)",
IF_NAME(nbr->oi),
- inet_ntoa(nbr->address.u.prefix4));
+ inet_ntoa(nbr->address.u.prefix4),
+ ospf_get_name(nbr->oi->ospf));
}
return 0;
}
/* Neighbor State Machine */
-struct {
+const struct {
int (*func)(struct ospf_neighbor *);
int next_state;
} NSM[OSPF_NSM_STATE_MAX][OSPF_NSM_EVENT_MAX] = {
},
};
-static const char *ospf_nsm_event_str[] = {
+static const char *const ospf_nsm_event_str[] = {
"NoEvent", "PacketReceived", "Start",
"2-WayReceived", "NegotiationDone", "ExchangeDone",
"BadLSReq", "LoadingDone", "AdjOK?",
{
/* Logging change of status. */
if (IS_DEBUG_OSPF(nsm, NSM_STATUS))
- zlog_debug("NSM[%s:%s]: State change %s -> %s (%s)",
+ zlog_debug("NSM[%s:%s:%s]: State change %s -> %s (%s)",
IF_NAME(nbr->oi), inet_ntoa(nbr->router_id),
+ ospf_get_name(nbr->oi->ospf),
lookup_msg(ospf_nsm_state_msg, nbr->state, NULL),
lookup_msg(ospf_nsm_state_msg, next_state, NULL),
ospf_nsm_event_str[event]);
if (CHECK_FLAG(nbr->oi->ospf->config, OSPF_LOG_ADJACENCY_CHANGES)
&& (CHECK_FLAG(nbr->oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL)
|| (next_state == NSM_Full) || (next_state < nbr->state)))
- zlog_notice("AdjChg: Nbr %s on %s: %s -> %s (%s)",
- inet_ntoa(nbr->router_id), IF_NAME(nbr->oi),
+ zlog_notice("AdjChg: Nbr %s(%s) on %s: %s -> %s (%s)",
+ inet_ntoa(nbr->router_id),
+ ospf_get_name(nbr->oi->ospf), IF_NAME(nbr->oi),
lookup_msg(ospf_nsm_state_msg, nbr->state, NULL),
lookup_msg(ospf_nsm_state_msg, next_state, NULL),
ospf_nsm_event_str[event]);
if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL))
zlog_info(
- "%s:(%s, %s -> %s): "
+ "%s:[%s:%s], %s -> %s): "
"scheduling new router-LSA origination",
__PRETTY_FUNCTION__, inet_ntoa(nbr->router_id),
+ ospf_get_name(oi->ospf),
lookup_msg(ospf_nsm_state_msg, old_state, NULL),
lookup_msg(ospf_nsm_state_msg, state, NULL));
nbr->dd_flags =
OSPF_DD_FLAG_I | OSPF_DD_FLAG_M | OSPF_DD_FLAG_MS;
+ if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL))
+ zlog_info(
+ "%s: Intializing [DD]: %s with seqnum:%x , flags:%x",
+ (oi->ospf->name) ? oi->ospf->name
+ : VRF_DEFAULT_NAME,
+ inet_ntoa(nbr->router_id), nbr->dd_seqnum,
+ nbr->dd_flags);
ospf_db_desc_send(nbr);
}
event = THREAD_VAL(thread);
if (IS_DEBUG_OSPF(nsm, NSM_EVENTS))
- zlog_debug("NSM[%s:%s]: %s (%s)", IF_NAME(nbr->oi),
+ zlog_debug("NSM[%s:%s:%s]: %s (%s)", IF_NAME(nbr->oi),
inet_ntoa(nbr->router_id),
+ ospf_get_name(nbr->oi->ospf),
lookup_msg(ospf_nsm_state_msg, nbr->state, NULL),
ospf_nsm_event_str[event]);
*/
flog_err(
EC_OSPF_FSM_INVALID_STATE,
- "NSM[%s:%s]: %s (%s): "
+ "NSM[%s:%s:%s]: %s (%s): "
"Warning: action tried to change next_state to %s",
IF_NAME(nbr->oi), inet_ntoa(nbr->router_id),
+ ospf_get_name(nbr->oi->ospf),
lookup_msg(ospf_nsm_state_msg, nbr->state,
NULL),
ospf_nsm_event_str[event],