int rc = -1;
if (lookup_ext_by_ifp(ifp) != NULL) {
- zlog_warn("EXT (%s): interface %s is already in use", __func__,
- ifp ? ifp->name : "-");
rc = 0; /* Do nothing here. */
return rc;
}
/* Create a stream for LSA. */
s = stream_new(OSPF_MAX_LSA_SIZE);
- if (s == NULL) {
- zlog_warn("EXT (%s): stream_new() error", __func__);
- return NULL;
- }
/* Prepare LSA Header */
lsah = (struct lsa_header *)STREAM_DATA(s);
/* Create a stream for LSA. */
s = stream_new(OSPF_MAX_LSA_SIZE);
- if (s == NULL) {
- zlog_warn("EXT (%s): stream_new() error", __func__);
- return NULL;
- }
lsah = (struct lsa_header *)STREAM_DATA(s);
options = OSPF_OPTION_O; /* Don't forget this :-) */
* there should be due to the ospf_spf_has_link() check
* in SPF. Lets warn and try pick a link anyway.
*/
- zlog_warn("ospf_vl_set_params: No backlink for %s!",
+ zlog_info("ospf_vl_set_params: No backlink for %s!",
vl_data->vl_oi->ifp->name);
for (i = 0; i < ntohs(rl->links); i++) {
switch (rl->link[i].type) {
{
struct ospf_lsa *old;
- if (!lsdb) {
- zlog_warn("%s: Called with NULL lsdb!", __func__);
- if (!lsa)
- zlog_warn("%s: and NULL LSA!", __func__);
- else
- zlog_warn("LSA[Type%d:%s]: not associated with LSDB!",
- lsa->data->type, inet_ntoa(lsa->data->id));
+ if (!lsdb)
return;
- }
old = ospf_lsdb_lookup(lsdb, lsa);
struct prefix_ls lp;
struct route_node *rn;
- if (!lsdb) {
- zlog_warn("%s: Called with NULL LSDB", __func__);
- if (lsa)
- zlog_warn("LSA[Type%d:%s]: LSA %p, lsa->lsdb %p",
- lsa->data->type, inet_ntoa(lsa->data->id),
- (void *)lsa, (void *)lsa->lsdb);
+ if (!lsdb || !lsa)
return;
- }
-
- if (!lsa) {
- zlog_warn("%s: Called with NULL LSA", __func__);
- return;
- }
assert(lsa->data->type < OSPF_MAX_LSA);
table = lsdb->type[lsa->data->type].db;
uint16_t length;
/* Create a stream for LSA. */
- if ((s = stream_new(OSPF_MAX_LSA_SIZE)) == NULL) {
- zlog_warn("ospf_router_info_lsa_new: stream_new() ?");
- return NULL;
- }
+ s = stream_new(OSPF_MAX_LSA_SIZE);
+
lsah = (struct lsa_header *)STREAM_DATA(s);
options = OSPF_OPTION_E; /* Enable AS external as we flood RI with
srn = hash_get(OspfSR.neighbors, (void *)&(ospf->router_id),
(void *)sr_node_new);
- /* Sanity Check */
- if (srn == NULL)
- return rc;
-
/* Complete & Store self SR Node */
srn->srgb.range_size = OspfSR.srgb.range_size;
srn->srgb.lower_bound = OspfSR.srgb.lower_bound;
/* Start Segment Routing */
OspfSR.enabled = true;
- if (!ospf_sr_start(ospf)) {
- zlog_warn("SR: Unable to start Segment Routing. Abort!");
- return CMD_WARNING;
- }
+ ospf_sr_start(ospf);
/* Set Router Information SR parameters */
if (IS_DEBUG_OSPF_EVENT)
* update of this Extended Prefix
*/
listnode_add(OspfSR.self->ext_prefix, new);
- zlog_warn(
+ zlog_info(
"Interface for prefix %s/%u not found. Deferred LSA "
"flooding",
inet_ntoa(p.u.prefix4), p.prefixlen);
uint16_t length;
/* Create a stream for LSA. */
- if ((s = stream_new(OSPF_MAX_LSA_SIZE)) == NULL) {
- zlog_warn("ospf_mpls_te_lsa_new: stream_new() ?");
- return NULL;
- }
+ s = stream_new(OSPF_MAX_LSA_SIZE);
lsah = (struct lsa_header *)STREAM_DATA(s);
options = OSPF_OPTION_O; /* Don't forget this :-) */
if (CHECK_FLAG(lp->flags, LPFLG_LSA_ENGAGED)) {
if (CHECK_FLAG(lp->flags, LPFLG_LSA_FORCED_REFRESH)) {
UNSET_FLAG(lp->flags, LPFLG_LSA_FORCED_REFRESH);
- zlog_warn(
+ zlog_info(
"OSPF MPLS-TE (ospf_mpls_te_lsa_originate_area): Refresh instead of Originate");
ospf_mpls_te_lsa_schedule(lp, REFRESH_THIS_LSA);
}
}
if (!is_mandated_params_set(lp)) {
- zlog_warn(
+ zlog_info(
"ospf_mpls_te_lsa_originate_area: Link(%s) lacks some mandated MPLS-TE parameters.",
lp->ifp ? lp->ifp->name : "?");
continue;
if (ifp == NULL)
return 0;
- if (if_is_up(ifp))
- zlog_warn("Zebra: got delete of %s, but interface is still up",
- ifp->name);
-
if (IS_DEBUG_OSPF(zebra, ZEBRA_INTERFACE))
zlog_debug(
"Zebra: interface delete %s vrf %s[%u] index %d flags %llx metric %d mtu %d",
new->lsa_refresh_interval, &new->t_lsa_refresher);
new->lsa_refresher_started = monotime(NULL);
- if ((new->ibuf = stream_new(OSPF_MAX_PACKET_SIZE + 1)) == NULL) {
- zlog_err(
- "ospf_new: fatal error: stream_new(%u) failed allocating ibuf",
- OSPF_MAX_PACKET_SIZE + 1);
- exit(1);
- }
+ new->ibuf = stream_new(OSPF_MAX_PACKET_SIZE + 1);
+
new->t_read = NULL;
new->oi_write_q = list_new();
new->write_oi_count = OSPF_WRITE_INTERFACE_COUNT_DEFAULT;