*: un-split strings across lines

Remove mid-string line breaks, cf. workflow doc:

  .. [#tool_style_conflicts] For example, lines over 80 characters are allowed
     for text strings to make it possible to search the code for them: please
     see `Linux kernel style (breaking long lines and strings)
     <https://www.kernel.org/doc/html/v4.10/process/coding-style.html#breaking-long-lines-and-strings>`_
     and `Issue #1794 <https://github.com/FRRouting/frr/issues/1794>`_.

Scripted commit, idempotent to running:
```
python3 tools/stringmangle.py --unwrap `git ls-files | egrep '\.[ch]$'`
```

Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
David Lamparter 2020-03-27 12:35:23 +01:00
parent 93195af63f
commit 3efd0893d0
123 changed files with 511 additions and 1159 deletions

View file

@ -692,8 +692,7 @@ interface_recalculate(struct interface *ifp)
rc = resize_receive_buffer(mtu); rc = resize_receive_buffer(mtu);
if(rc < 0) if(rc < 0)
zlog_warn("couldn't resize " zlog_warn("couldn't resize receive buffer for interface %s (%d) (%d bytes).\n",
"receive buffer for interface %s (%d) (%d bytes).\n",
ifp->name, ifp->ifindex, mtu); ifp->name, ifp->ifindex, mtu);
memset(&mreq, 0, sizeof(mreq)); memset(&mreq, 0, sizeof(mreq));
@ -896,8 +895,7 @@ static void
show_babel_neighbour_sub (struct vty *vty, struct neighbour *neigh) show_babel_neighbour_sub (struct vty *vty, struct neighbour *neigh)
{ {
vty_out (vty, vty_out (vty,
"Neighbour %s dev %s reach %04x rxcost %d txcost %d " "Neighbour %s dev %s reach %04x rxcost %d txcost %d rtt %s rttcost %d%s.\n",
"rtt %s rttcost %d%s.\n",
format_address(neigh->address), format_address(neigh->address),
neigh->ifp->name, neigh->ifp->name,
neigh->reach, neigh->reach,
@ -988,8 +986,7 @@ show_babel_routes_sub(struct babel_route *route, struct vty *vty,
} }
vty_out (vty, vty_out (vty,
"%s metric %d refmetric %d id %s seqno %d%s age %d " "%s metric %d refmetric %d id %s seqno %d%s age %d via %s neigh %s%s%s%s\n",
"via %s neigh %s%s%s%s\n",
format_prefix(route->src->prefix, route->src->plen), format_prefix(route->src->prefix, route->src->plen),
route_metric(route), route->refmetric, route_metric(route), route->refmetric,
format_eui64(route->src->id), format_eui64(route->src->id),

View file

@ -710,8 +710,7 @@ fill_rtt_message(struct interface *ifp)
DO_HTONL(babel_ifp->sendbuf + babel_ifp->buffered_hello + 10, time); DO_HTONL(babel_ifp->sendbuf + babel_ifp->buffered_hello + 10, time);
return 1; return 1;
} else { } else {
flog_err(EC_BABEL_PACKET, "No space left for timestamp sub-TLV " flog_err(EC_BABEL_PACKET, "No space left for timestamp sub-TLV (this shouldn't happen)");
"(this shouldn't happen)");
return -1; return -1;
} }
} }

View file

@ -399,16 +399,14 @@ install_route(struct babel_route *route)
return; return;
if(!route_feasible(route)) if(!route_feasible(route))
flog_err(EC_BABEL_ROUTE, "WARNING: installing unfeasible route " flog_err(EC_BABEL_ROUTE, "WARNING: installing unfeasible route (this shouldn't happen).");
"(this shouldn't happen).");
i = find_route_slot(route->src->prefix, route->src->plen, NULL); i = find_route_slot(route->src->prefix, route->src->plen, NULL);
assert(i >= 0 && i < route_slots); assert(i >= 0 && i < route_slots);
if(routes[i] != route && routes[i]->installed) { if(routes[i] != route && routes[i]->installed) {
flog_err(EC_BABEL_ROUTE, flog_err(EC_BABEL_ROUTE,
"WARNING: attempting to install duplicate route " "WARNING: attempting to install duplicate route (this shouldn't happen).");
"(this shouldn't happen).");
return; return;
} }
@ -465,8 +463,7 @@ switch_routes(struct babel_route *old, struct babel_route *new)
return; return;
if(!route_feasible(new)) if(!route_feasible(new))
flog_err(EC_BABEL_ROUTE, "WARNING: switching to unfeasible route " flog_err(EC_BABEL_ROUTE, "WARNING: switching to unfeasible route (this shouldn't happen).");
"(this shouldn't happen).");
rc = kernel_route(ROUTE_MODIFY, old->src->prefix, old->src->plen, rc = kernel_route(ROUTE_MODIFY, old->src->prefix, old->src->plen,
old->nexthop, old->neigh->ifp->ifindex, old->nexthop, old->neigh->ifp->ifindex,
@ -835,8 +832,7 @@ update_route(const unsigned char *router_id,
in a timely manner. If the source remains the same, we ignore in a timely manner. If the source remains the same, we ignore
the update. */ the update. */
if(!feasible && route->installed) { if(!feasible && route->installed) {
debugf(BABEL_DEBUG_COMMON,"Unfeasible update for installed route to %s " debugf(BABEL_DEBUG_COMMON,"Unfeasible update for installed route to %s (%s %d %d -> %s %d %d).",
"(%s %d %d -> %s %d %d).",
format_prefix(src->prefix, src->plen), format_prefix(src->prefix, src->plen),
format_eui64(route->src->id), format_eui64(route->src->id),
route->seqno, route->refmetric, route->seqno, route->refmetric,

View file

@ -1693,8 +1693,7 @@ struct bfd_session *bfd_key_lookup(struct bfd_key key)
inet_ntop(bs.key.family, &bs.key.local, inet_ntop(bs.key.family, &bs.key.local,
addr_buf, sizeof(addr_buf)); addr_buf, sizeof(addr_buf));
zlog_debug( zlog_debug(
" peer %s found, but ifp %s" " peer %s found, but ifp %s and loc-addr %s ignored",
" and loc-addr %s ignored",
peer_buf, key.ifname, addr_buf); peer_buf, key.ifname, addr_buf);
} }
return bsp; return bsp;
@ -1716,8 +1715,7 @@ struct bfd_session *bfd_key_lookup(struct bfd_key key)
bsp = ctx.result; bsp = ctx.result;
if (bglobal.debug_peer_event) if (bglobal.debug_peer_event)
zlog_debug( zlog_debug(
" peer %s found, but ifp" " peer %s found, but ifp and/or loc-addr params ignored",
" and/or loc-addr params ignored",
peer_buf); peer_buf);
} }
return bsp; return bsp;

View file

@ -85,8 +85,7 @@ static int bfd_session_create(enum nb_event event, const struct lyd_node *dnode,
if (p.family == AF_INET6 && IN6_IS_ADDR_LINKLOCAL(&p.u.prefix6) if (p.family == AF_INET6 && IN6_IS_ADDR_LINKLOCAL(&p.u.prefix6)
&& strlen(ifname) == 0) { && strlen(ifname) == 0) {
zlog_warn( zlog_warn(
"%s: when using link-local you must specify " "%s: when using link-local you must specify an interface.",
"an interface.",
__func__); __func__);
return NB_ERR_VALIDATION; return NB_ERR_VALIDATION;
} }

View file

@ -152,8 +152,7 @@ static void _ptm_bfd_session_del(struct bfd_session *bs, uint8_t diag)
*/ */
if (CHECK_FLAG(bs->flags, BFD_SESS_FLAG_CONFIG)) { if (CHECK_FLAG(bs->flags, BFD_SESS_FLAG_CONFIG)) {
zlog_err( zlog_err(
"ptm-del-session: [%s] session refcount is " "ptm-del-session: [%s] session refcount is zero but it was configured by CLI",
"zero but it was configured by CLI",
bs_to_string(bs)); bs_to_string(bs));
} else { } else {
control_notify_config(BCM_NOTIFY_CONFIG_DELETE, bs); control_notify_config(BCM_NOTIFY_CONFIG_DELETE, bs);

View file

@ -1723,8 +1723,7 @@ struct aspath *aspath_reconcile_as4(struct aspath *aspath,
if (hops < seg->length) { if (hops < seg->length) {
if (BGP_DEBUG(as4, AS4)) if (BGP_DEBUG(as4, AS4))
zlog_debug( zlog_debug(
"[AS4] AS4PATHmangle: AS_CONFED_SEQUENCE falls" "[AS4] AS4PATHmangle: AS_CONFED_SEQUENCE falls across 2/4 ASN boundary somewhere, broken..");
" across 2/4 ASN boundary somewhere, broken..");
hops = seg->length; hops = seg->length;
} }
/* fallthru */ /* fallthru */

View file

@ -1244,8 +1244,7 @@ bgp_attr_flags_diagnose(struct bgp_attr_parser_args *args,
} }
if (!seen) { if (!seen) {
zlog_debug( zlog_debug(
"Strange, %s called for attr %s, but no problem found with flags" "Strange, %s called for attr %s, but no problem found with flags (real flags 0x%x, desired 0x%x)",
" (real flags 0x%x, desired 0x%x)",
__func__, lookup_msg(attr_str, attr_code, NULL), __func__, lookup_msg(attr_str, attr_code, NULL),
real_flags, desired_flags); real_flags, desired_flags);
} }
@ -1311,16 +1310,14 @@ static bool bgp_attr_flag_invalid(struct bgp_attr_parser_args *args)
if (CHECK_FLAG(flags, BGP_ATTR_FLAG_PARTIAL)) { if (CHECK_FLAG(flags, BGP_ATTR_FLAG_PARTIAL)) {
if (!CHECK_FLAG(flags, BGP_ATTR_FLAG_OPTIONAL)) { if (!CHECK_FLAG(flags, BGP_ATTR_FLAG_OPTIONAL)) {
flog_err(EC_BGP_ATTR_FLAG, flog_err(EC_BGP_ATTR_FLAG,
"%s well-known attribute " "%s well-known attribute must NOT have the partial flag set (%x)",
"must NOT have the partial flag set (%x)",
lookup_msg(attr_str, attr_code, NULL), flags); lookup_msg(attr_str, attr_code, NULL), flags);
return true; return true;
} }
if (CHECK_FLAG(flags, BGP_ATTR_FLAG_OPTIONAL) if (CHECK_FLAG(flags, BGP_ATTR_FLAG_OPTIONAL)
&& !CHECK_FLAG(flags, BGP_ATTR_FLAG_TRANS)) { && !CHECK_FLAG(flags, BGP_ATTR_FLAG_TRANS)) {
flog_err(EC_BGP_ATTR_FLAG, flog_err(EC_BGP_ATTR_FLAG,
"%s optional + transitive attribute " "%s optional + transitive attribute must NOT have the partial flag set (%x)",
"must NOT have the partial flag set (%x)",
lookup_msg(attr_str, attr_code, NULL), flags); lookup_msg(attr_str, attr_code, NULL), flags);
return true; return true;
} }
@ -1773,10 +1770,7 @@ bgp_attr_munge_as4_attrs(struct peer *const peer, struct attr *const attr,
/* ignore */ /* ignore */
if (BGP_DEBUG(as4, AS4)) if (BGP_DEBUG(as4, AS4))
zlog_debug( zlog_debug(
"[AS4] %s BGP not AS4 capable peer" "[AS4] %s BGP not AS4 capable peer send AGGREGATOR != AS_TRANS and AS4_AGGREGATOR, so ignore AS4_AGGREGATOR and AS4_PATH",
" send AGGREGATOR != AS_TRANS and"
" AS4_AGGREGATOR, so ignore"
" AS4_AGGREGATOR and AS4_PATH",
peer->host); peer->host);
ignore_as4_path = 1; ignore_as4_path = 1;
} else { } else {
@ -1794,9 +1788,7 @@ bgp_attr_munge_as4_attrs(struct peer *const peer, struct attr *const attr,
*/ */
if (BGP_DEBUG(as4, AS4)) if (BGP_DEBUG(as4, AS4))
zlog_debug( zlog_debug(
"[AS4] %s BGP not AS4 capable peer send" "[AS4] %s BGP not AS4 capable peer send AS4_AGGREGATOR but no AGGREGATOR, will take it as if AGGREGATOR with AS_TRANS had been there",
" AS4_AGGREGATOR but no AGGREGATOR, will take"
" it as if AGGREGATOR with AS_TRANS had been there",
peer->host); peer->host);
attr->aggregator_as = as4_aggregator; attr->aggregator_as = as4_aggregator;
/* sweep it under the carpet and simulate a "good" /* sweep it under the carpet and simulate a "good"
@ -2676,8 +2668,7 @@ bgp_attr_parse_ret_t bgp_attr_prefix_sid(struct bgp_attr_parser_args *args)
if (psid_parsed_length > args->length) { if (psid_parsed_length > args->length) {
flog_err( flog_err(
EC_BGP_ATTR_LEN, EC_BGP_ATTR_LEN,
"Malformed Prefix SID attribute - TLV overflow by attribute (need %zu" "Malformed Prefix SID attribute - TLV overflow by attribute (need %zu for TLV length, have %zu overflowed in UPDATE)",
" for TLV length, have %zu overflowed in UPDATE)",
length + headersz, psid_parsed_length - (length + headersz)); length + headersz, psid_parsed_length - (length + headersz));
return bgp_attr_malformed( return bgp_attr_malformed(
args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR, args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,

View file

@ -351,8 +351,7 @@ static void bgp_bfd_peer_status_update(struct peer *peer, int status,
if (CHECK_FLAG(peer->sflags, PEER_STATUS_NSF_MODE) && if (CHECK_FLAG(peer->sflags, PEER_STATUS_NSF_MODE) &&
CHECK_FLAG(bfd_info->flags, BFD_FLAG_BFD_CHECK_CONTROLPLANE) && CHECK_FLAG(bfd_info->flags, BFD_FLAG_BFD_CHECK_CONTROLPLANE) &&
!remote_cbit) { !remote_cbit) {
zlog_info("%s BFD DOWN message ignored in the process" zlog_info("%s BFD DOWN message ignored in the process of graceful restart when C bit is cleared",
" of graceful restart when C bit is cleared",
peer->host); peer->host);
return; return;
} }

View file

@ -1942,9 +1942,7 @@ DEFPY(no_bmp_listener_main,
DEFPY(bmp_connect, DEFPY(bmp_connect,
bmp_connect_cmd, bmp_connect_cmd,
"[no] bmp connect HOSTNAME port (1-65535) " "[no] bmp connect HOSTNAME port (1-65535) {min-retry (100-86400000)|max-retry (100-86400000)}",
"{min-retry (100-86400000)"
"|max-retry (100-86400000)}",
NO_STR NO_STR
BMP_STR BMP_STR
"Actively establish connection to monitoring station\n" "Actively establish connection to monitoring station\n"

View file

@ -676,13 +676,10 @@ static int ecommunity_lb_str(char *buf, size_t bufsz, const uint8_t *pnt)
are three types of format. are three types of format.
route-map set extcommunity format route-map set extcommunity format
"rt 100:1 100:2" "rt 100:1 100:2soo 100:3"
"soo 100:3"
extcommunity-list extcommunity-list
"rt 100:1 rt 100:2 soo 100:3" "rt 100:1 rt 100:2 soo 100:3show [ip] bgp" and extcommunity-list regular expression matching
"show [ip] bgp" and extcommunity-list regular expression matching
"RT:100:1 RT:100:2 SoO:100:3" "RT:100:1 RT:100:2 SoO:100:3"
For each formath please use below definition for format: For each formath please use below definition for format:

View file

@ -345,8 +345,7 @@ static void bgp_evpn_show_route_header(struct vty *vty, struct bgp *bgp,
vty_out(vty, "BGP table version is %" PRIu64 ", local router ID is %s\n", vty_out(vty, "BGP table version is %" PRIu64 ", local router ID is %s\n",
tbl_ver, inet_ntoa(bgp->router_id)); tbl_ver, inet_ntoa(bgp->router_id));
vty_out(vty, vty_out(vty,
"Status codes: s suppressed, d damped, h history, " "Status codes: s suppressed, d damped, h history, * valid, > best, i - internal\n");
"* valid, > best, i - internal\n");
vty_out(vty, "Origin codes: i - IGP, e - EGP, ? - incomplete\n"); vty_out(vty, "Origin codes: i - IGP, e - EGP, ? - incomplete\n");
vty_out(vty, vty_out(vty,
"EVPN type-2 prefix: [2]:[EthTag]:[MAClen]:[MAC]:[IPlen]:[IP]\n"); "EVPN type-2 prefix: [2]:[EthTag]:[MAClen]:[MAC]:[IPlen]:[IP]\n");

View file

@ -1553,8 +1553,7 @@ int bgp_start(struct peer *peer)
if (BGP_PEER_START_SUPPRESSED(peer)) { if (BGP_PEER_START_SUPPRESSED(peer)) {
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
flog_err(EC_BGP_FSM, flog_err(EC_BGP_FSM,
"%s [FSM] Trying to start suppressed peer" "%s [FSM] Trying to start suppressed peer - this is never supposed to happen!",
" - this is never supposed to happen!",
peer->host); peer->host);
if (CHECK_FLAG(peer->flags, PEER_FLAG_SHUTDOWN)) if (CHECK_FLAG(peer->flags, PEER_FLAG_SHUTDOWN))
peer->last_reset = PEER_DOWN_USER_SHUTDOWN; peer->last_reset = PEER_DOWN_USER_SHUTDOWN;
@ -2285,8 +2284,7 @@ int bgp_event_update(struct peer *peer, enum bgp_fsm_events event)
if (!dyn_nbr && !passive_conn && peer->bgp) { if (!dyn_nbr && !passive_conn && peer->bgp) {
flog_err( flog_err(
EC_BGP_FSM, EC_BGP_FSM,
"%s [FSM] Failure handling event %s in state %s, " "%s [FSM] Failure handling event %s in state %s, prior events %s, %s, fd %d",
"prior events %s, %s, fd %d",
peer->host, bgp_event_str[peer->cur_event], peer->host, bgp_event_str[peer->cur_event],
lookup_msg(bgp_status_msg, peer->status, NULL), lookup_msg(bgp_status_msg, peer->status, NULL),
bgp_event_str[peer->last_event], bgp_event_str[peer->last_event],

View file

@ -394,8 +394,7 @@ int bgp_nlri_parse_label(struct peer *peer, struct attr *attr,
/* There needs to be at least one label */ /* There needs to be at least one label */
if (prefixlen < 24) { if (prefixlen < 24) {
flog_err(EC_BGP_UPDATE_RCV, flog_err(EC_BGP_UPDATE_RCV,
"%s [Error] Update packet error" "%s [Error] Update packet error (wrong label length %d)",
" (wrong label length %d)",
peer->host, prefixlen); peer->host, prefixlen);
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR, bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_INVAL_NETWORK); BGP_NOTIFY_UPDATE_INVAL_NETWORK);

View file

@ -739,8 +739,7 @@ void bgp_path_info_mpath_update(struct bgp_dest *dest,
if (debug) if (debug)
zlog_debug( zlog_debug(
"%pRN: New mpath count (incl newbest) %d mpath-change %s" "%pRN: New mpath count (incl newbest) %d mpath-change %s all_paths_lb %d cum_bw u%" PRIu64,
" all_paths_lb %d cum_bw u%" PRIu64,
bgp_dest_to_rnode(dest), mpath_count, bgp_dest_to_rnode(dest), mpath_count,
mpath_changed ? "YES" : "NO", mpath_changed ? "YES" : "NO",
all_paths_lb, cum_bw); all_paths_lb, cum_bw);

View file

@ -274,8 +274,7 @@ void vpn_leak_zebra_vrf_label_update(struct bgp *bgp, afi_t afi)
if (bgp->vrf_id == VRF_UNKNOWN) { if (bgp->vrf_id == VRF_UNKNOWN) {
if (debug) { if (debug) {
zlog_debug( zlog_debug(
"%s: vrf %s: afi %s: vrf_id not set, " "%s: vrf %s: afi %s: vrf_id not set, can't set zebra vrf label",
"can't set zebra vrf label",
__func__, bgp->name_pretty, afi2str(afi)); __func__, bgp->name_pretty, afi2str(afi));
} }
return; return;

View file

@ -501,8 +501,7 @@ static int bgp_accept(struct thread *thread)
if (BGP_PEER_START_SUPPRESSED(peer1)) { if (BGP_PEER_START_SUPPRESSED(peer1)) {
if (bgp_debug_neighbor_events(peer1)) if (bgp_debug_neighbor_events(peer1))
zlog_debug( zlog_debug(
"[Event] Incoming BGP connection rejected from %s " "[Event] Incoming BGP connection rejected from %s due to maximum-prefix or shutdown",
"due to maximum-prefix or shutdown",
peer1->host); peer1->host);
close(bgp_sock); close(bgp_sock);
return -1; return -1;
@ -518,8 +517,7 @@ static int bgp_accept(struct thread *thread)
*/ */
if (bgp_debug_neighbor_events(peer1)) if (bgp_debug_neighbor_events(peer1))
zlog_debug( zlog_debug(
"[Event] New active connection from peer %s, Killing" "[Event] New active connection from peer %s, Killing previous active connection",
" previous active connection",
peer1->host); peer1->host);
peer_delete(peer1->doppelganger); peer_delete(peer1->doppelganger);
} }

View file

@ -332,8 +332,7 @@ static int bgp_capability_orf_entry(struct peer *peer,
/* Convert AFI, SAFI to internal values, check. */ /* Convert AFI, SAFI to internal values, check. */
if (bgp_map_afi_safi_iana2int(pkt_afi, pkt_safi, &afi, &safi)) { if (bgp_map_afi_safi_iana2int(pkt_afi, pkt_safi, &afi, &safi)) {
zlog_info( zlog_info(
"%s Addr-family %d/%d not supported." "%s Addr-family %d/%d not supported. Ignoring the ORF capability",
" Ignoring the ORF capability",
peer->host, pkt_afi, pkt_safi); peer->host, pkt_afi, pkt_safi);
return 0; return 0;
} }
@ -344,8 +343,7 @@ static int bgp_capability_orf_entry(struct peer *peer,
/* validate number field */ /* validate number field */
if (CAPABILITY_CODE_ORF_LEN + (num * 2) > hdr->length) { if (CAPABILITY_CODE_ORF_LEN + (num * 2) > hdr->length) {
zlog_info( zlog_info(
"%s ORF Capability entry length error," "%s ORF Capability entry length error, Cap length %u, num %u",
" Cap length %u, num %u",
peer->host, hdr->length, num); peer->host, hdr->length, num);
bgp_notify_send(peer, BGP_NOTIFY_OPEN_ERR, bgp_notify_send(peer, BGP_NOTIFY_OPEN_ERR,
BGP_NOTIFY_OPEN_MALFORMED_ATTR); BGP_NOTIFY_OPEN_MALFORMED_ATTR);
@ -407,8 +405,7 @@ static int bgp_capability_orf_entry(struct peer *peer,
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
zlog_debug( zlog_debug(
"%s OPEN has %s ORF capability" "%s OPEN has %s ORF capability as %s for afi/safi: %s/%s",
" as %s for afi/safi: %s/%s",
peer->host, peer->host,
lookup_msg(orf_type_str, type, NULL), lookup_msg(orf_type_str, type, NULL),
lookup_msg(orf_mode_str, mode, NULL), lookup_msg(orf_mode_str, mode, NULL),
@ -490,15 +487,13 @@ static int bgp_capability_restart(struct peer *peer,
if (bgp_map_afi_safi_iana2int(pkt_afi, pkt_safi, &afi, &safi)) { if (bgp_map_afi_safi_iana2int(pkt_afi, pkt_safi, &afi, &safi)) {
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
zlog_debug( zlog_debug(
"%s Addr-family %s/%s(afi/safi) not supported." "%s Addr-family %s/%s(afi/safi) not supported. Ignore the Graceful Restart capability for this AFI/SAFI",
" Ignore the Graceful Restart capability for this AFI/SAFI",
peer->host, iana_afi2str(pkt_afi), peer->host, iana_afi2str(pkt_afi),
iana_safi2str(pkt_safi)); iana_safi2str(pkt_safi));
} else if (!peer->afc[afi][safi]) { } else if (!peer->afc[afi][safi]) {
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
zlog_debug( zlog_debug(
"%s Addr-family %s/%s(afi/safi) not enabled." "%s Addr-family %s/%s(afi/safi) not enabled. Ignore the Graceful Restart capability",
" Ignore the Graceful Restart capability",
peer->host, iana_afi2str(pkt_afi), peer->host, iana_afi2str(pkt_afi),
iana_safi2str(pkt_safi)); iana_safi2str(pkt_safi));
} else { } else {
@ -581,16 +576,14 @@ static int bgp_capability_addpath(struct peer *peer,
if (bgp_map_afi_safi_iana2int(pkt_afi, pkt_safi, &afi, &safi)) { if (bgp_map_afi_safi_iana2int(pkt_afi, pkt_safi, &afi, &safi)) {
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
zlog_debug( zlog_debug(
"%s Addr-family %s/%s(afi/safi) not supported." "%s Addr-family %s/%s(afi/safi) not supported. Ignore the Addpath Attribute for this AFI/SAFI",
" Ignore the Addpath Attribute for this AFI/SAFI",
peer->host, iana_afi2str(pkt_afi), peer->host, iana_afi2str(pkt_afi),
iana_safi2str(pkt_safi)); iana_safi2str(pkt_safi));
continue; continue;
} else if (!peer->afc[afi][safi]) { } else if (!peer->afc[afi][safi]) {
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
zlog_debug( zlog_debug(
"%s Addr-family %s/%s(afi/safi) not enabled." "%s Addr-family %s/%s(afi/safi) not enabled. Ignore the AddPath capability for this AFI/SAFI",
" Ignore the AddPath capability for this AFI/SAFI",
peer->host, iana_afi2str(pkt_afi), peer->host, iana_afi2str(pkt_afi),
iana_safi2str(pkt_safi)); iana_safi2str(pkt_safi));
continue; continue;
@ -640,8 +633,7 @@ static int bgp_capability_enhe(struct peer *peer, struct capability_header *hdr)
if (bgp_map_afi_safi_iana2int(pkt_afi, pkt_safi, &afi, &safi)) { if (bgp_map_afi_safi_iana2int(pkt_afi, pkt_safi, &afi, &safi)) {
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
zlog_debug( zlog_debug(
"%s Addr-family %s/%s(afi/safi) not supported." "%s Addr-family %s/%s(afi/safi) not supported. Ignore the ENHE Attribute for this AFI/SAFI",
" Ignore the ENHE Attribute for this AFI/SAFI",
peer->host, iana_afi2str(pkt_afi), peer->host, iana_afi2str(pkt_afi),
iana_safi2str(pkt_safi)); iana_safi2str(pkt_safi));
continue; continue;
@ -662,8 +654,7 @@ static int bgp_capability_enhe(struct peer *peer, struct capability_header *hdr)
|| safi == SAFI_LABELED_UNICAST)) { || safi == SAFI_LABELED_UNICAST)) {
flog_warn( flog_warn(
EC_BGP_CAPABILITY_INVALID_DATA, EC_BGP_CAPABILITY_INVALID_DATA,
"%s Unexpected afi/safi/next-hop afi: %s/%s/%u " "%s Unexpected afi/safi/next-hop afi: %s/%s/%u in Extended Next-hop capability, ignoring",
"in Extended Next-hop capability, ignoring",
peer->host, iana_afi2str(pkt_afi), peer->host, iana_afi2str(pkt_afi),
iana_safi2str(pkt_safi), pkt_nh_afi); iana_safi2str(pkt_safi), pkt_nh_afi);
continue; continue;
@ -875,8 +866,7 @@ static int bgp_capability_parse(struct peer *peer, size_t length,
/* Check length. */ /* Check length. */
if (caphdr.length < cap_minsizes[caphdr.code]) { if (caphdr.length < cap_minsizes[caphdr.code]) {
zlog_info( zlog_info(
"%s %s Capability length error: got %u," "%s %s Capability length error: got %u, expected at least %u",
" expected at least %u",
peer->host, peer->host,
lookup_msg(capcode_str, caphdr.code, lookup_msg(capcode_str, caphdr.code,
NULL), NULL),
@ -889,8 +879,7 @@ static int bgp_capability_parse(struct peer *peer, size_t length,
if (caphdr.length if (caphdr.length
&& caphdr.length % cap_modsizes[caphdr.code] != 0) { && caphdr.length % cap_modsizes[caphdr.code] != 0) {
zlog_info( zlog_info(
"%s %s Capability length error: got %u," "%s %s Capability length error: got %u, expected a multiple of %u",
" expected a multiple of %u",
peer->host, peer->host,
lookup_msg(capcode_str, caphdr.code, lookup_msg(capcode_str, caphdr.code,
NULL), NULL),
@ -1036,8 +1025,7 @@ as_t peek_for_as4_capability(struct peer *peer, uint8_t length)
if (BGP_DEBUG(as4, AS4)) if (BGP_DEBUG(as4, AS4))
zlog_debug( zlog_debug(
"%s [AS4] rcv OPEN w/ OPTION parameter len: %u," "%s [AS4] rcv OPEN w/ OPTION parameter len: %u, peeking for as4",
" peeking for as4",
peer->host, length); peer->host, length);
/* the error cases we DONT handle, we ONLY try to read as4 out of /* the error cases we DONT handle, we ONLY try to read as4 out of
* correctly formatted options. * correctly formatted options.
@ -1211,8 +1199,7 @@ int bgp_open_option_parse(struct peer *peer, uint8_t length, int *mp_capability)
&& !peer->afc_nego[AFI_IP6][SAFI_FLOWSPEC] && !peer->afc_nego[AFI_IP6][SAFI_FLOWSPEC]
&& !peer->afc_nego[AFI_L2VPN][SAFI_EVPN]) { && !peer->afc_nego[AFI_L2VPN][SAFI_EVPN]) {
flog_err(EC_BGP_PKT_OPEN, flog_err(EC_BGP_PKT_OPEN,
"%s [Error] Configured AFI/SAFIs do not " "%s [Error] Configured AFI/SAFIs do not overlap with received MP capabilities",
"overlap with received MP capabilities",
peer->host); peer->host);
if (error != error_data) if (error != error_data)

View file

@ -1110,8 +1110,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size)
/* Receive OPEN message log */ /* Receive OPEN message log */
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
zlog_debug( zlog_debug(
"%s rcv OPEN, version %d, remote-as (in open) %u," "%s rcv OPEN, version %d, remote-as (in open) %u, holdtime %d, id %s",
" holdtime %d, id %s",
peer->host, version, remote_as, holdtime, peer->host, version, remote_as, holdtime,
inet_ntoa(remote_id)); inet_ntoa(remote_id));
@ -1177,13 +1176,11 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size)
if (!as4 && BGP_DEBUG(as4, AS4)) if (!as4 && BGP_DEBUG(as4, AS4))
zlog_debug( zlog_debug(
"%s [AS4] OPEN remote_as is AS_TRANS, but no AS4." "%s [AS4] OPEN remote_as is AS_TRANS, but no AS4. Odd, but proceeding.",
" Odd, but proceeding.",
peer->host); peer->host);
else if (as4 < BGP_AS_MAX && BGP_DEBUG(as4, AS4)) else if (as4 < BGP_AS_MAX && BGP_DEBUG(as4, AS4))
zlog_debug( zlog_debug(
"%s [AS4] OPEN remote_as is AS_TRANS, but AS4 (%u) fits " "%s [AS4] OPEN remote_as is AS_TRANS, but AS4 (%u) fits in 2-bytes, very odd peer.",
"in 2-bytes, very odd peer.",
peer->host, as4); peer->host, as4);
if (as4) if (as4)
remote_as = as4; remote_as = as4;
@ -1197,8 +1194,7 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size)
/* raise error, log this, close session */ /* raise error, log this, close session */
flog_err( flog_err(
EC_BGP_PKT_OPEN, EC_BGP_PKT_OPEN,
"%s bad OPEN, got AS4 capability, but remote_as %u" "%s bad OPEN, got AS4 capability, but remote_as %u mismatch with 16bit 'myasn' %u in open",
" mismatch with 16bit 'myasn' %u in open",
peer->host, as4, remote_as); peer->host, as4, remote_as);
bgp_notify_send_with_data(peer, BGP_NOTIFY_OPEN_ERR, bgp_notify_send_with_data(peer, BGP_NOTIFY_OPEN_ERR,
BGP_NOTIFY_OPEN_BAD_PEER_AS, BGP_NOTIFY_OPEN_BAD_PEER_AS,
@ -1493,8 +1489,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
Subcode is set to Malformed Attribute List. */ Subcode is set to Malformed Attribute List. */
if (stream_pnt(s) + 2 > end) { if (stream_pnt(s) + 2 > end) {
flog_err(EC_BGP_UPDATE_RCV, flog_err(EC_BGP_UPDATE_RCV,
"%s [Error] Update packet error" "%s [Error] Update packet error (packet length is short for unfeasible length)",
" (packet length is short for unfeasible length)",
peer->host); peer->host);
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR, bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_MAL_ATTR); BGP_NOTIFY_UPDATE_MAL_ATTR);
@ -1507,8 +1502,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
/* Unfeasible Route Length check. */ /* Unfeasible Route Length check. */
if (stream_pnt(s) + withdraw_len > end) { if (stream_pnt(s) + withdraw_len > end) {
flog_err(EC_BGP_UPDATE_RCV, flog_err(EC_BGP_UPDATE_RCV,
"%s [Error] Update packet error" "%s [Error] Update packet error (packet unfeasible length overflow %d)",
" (packet unfeasible length overflow %d)",
peer->host, withdraw_len); peer->host, withdraw_len);
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR, bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_MAL_ATTR); BGP_NOTIFY_UPDATE_MAL_ATTR);
@ -2063,8 +2057,7 @@ static int bgp_route_refresh_receive(struct peer *peer, bgp_size_t size)
if (!ok || (ok && ret != CMD_SUCCESS)) { if (!ok || (ok && ret != CMD_SUCCESS)) {
zlog_info( zlog_info(
"%s Received misformatted prefixlist ORF." "%s Received misformatted prefixlist ORF. Remove All pfxlist",
" Remove All pfxlist",
peer->host); peer->host);
prefix_bgp_orf_remove_all(afi, prefix_bgp_orf_remove_all(afi,
name); name);
@ -2194,8 +2187,7 @@ static int bgp_capability_msg_parse(struct peer *peer, uint8_t *pnt,
&safi)) { &safi)) {
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
zlog_debug( zlog_debug(
"%s Dynamic Capability MP_EXT afi/safi invalid " "%s Dynamic Capability MP_EXT afi/safi invalid (%s/%s)",
"(%s/%s)",
peer->host, peer->host,
iana_afi2str(pkt_afi), iana_afi2str(pkt_afi),
iana_safi2str(pkt_safi)); iana_safi2str(pkt_safi));

View file

@ -486,8 +486,7 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)
*/ */
if (api->match_protocol_num > 1) { if (api->match_protocol_num > 1) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match protocol operations:" zlog_debug("BGP: match protocol operations:multiple protocols ( %d). ignoring.",
"multiple protocols ( %d). ignoring.",
api->match_protocol_num); api->match_protocol_num);
return 0; return 0;
} }
@ -496,21 +495,18 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)
api->protocol[0].value != PROTOCOL_ICMP && api->protocol[0].value != PROTOCOL_ICMP &&
api->protocol[0].value != PROTOCOL_TCP) { api->protocol[0].value != PROTOCOL_TCP) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match protocol operations:" zlog_debug("BGP: match protocol operations:protocol (%d) not supported. ignoring",
"protocol (%d) not supported. ignoring",
api->match_protocol_num); api->match_protocol_num);
return 0; return 0;
} }
if (!bgp_pbr_extract(api->src_port, api->match_src_port_num, NULL)) { if (!bgp_pbr_extract(api->src_port, api->match_src_port_num, NULL)) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match src port operations:" zlog_debug("BGP: match src port operations:too complex. ignoring.");
"too complex. ignoring.");
return 0; return 0;
} }
if (!bgp_pbr_extract(api->dst_port, api->match_dst_port_num, NULL)) { if (!bgp_pbr_extract(api->dst_port, api->match_dst_port_num, NULL)) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match dst port operations:" zlog_debug("BGP: match dst port operations:too complex. ignoring.");
"too complex. ignoring.");
return 0; return 0;
} }
if (!bgp_pbr_extract_enumerate(api->tcpflags, if (!bgp_pbr_extract_enumerate(api->tcpflags,
@ -519,8 +515,7 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)
OPERATOR_UNARY_OR, NULL, OPERATOR_UNARY_OR, NULL,
FLOWSPEC_TCP_FLAGS)) { FLOWSPEC_TCP_FLAGS)) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match tcp flags:" zlog_debug("BGP: match tcp flags:too complex. ignoring.");
"too complex. ignoring.");
return 0; return 0;
} }
if (!bgp_pbr_extract(api->icmp_type, api->match_icmp_type_num, NULL)) { if (!bgp_pbr_extract(api->icmp_type, api->match_icmp_type_num, NULL)) {
@ -529,8 +524,7 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)
OPERATOR_UNARY_OR, NULL, OPERATOR_UNARY_OR, NULL,
FLOWSPEC_ICMP_TYPE)) { FLOWSPEC_ICMP_TYPE)) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match icmp type operations:" zlog_debug("BGP: match icmp type operations:too complex. ignoring.");
"too complex. ignoring.");
return 0; return 0;
} }
enumerate_icmp = true; enumerate_icmp = true;
@ -541,22 +535,18 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)
OPERATOR_UNARY_OR, NULL, OPERATOR_UNARY_OR, NULL,
FLOWSPEC_ICMP_CODE)) { FLOWSPEC_ICMP_CODE)) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match icmp code operations:" zlog_debug("BGP: match icmp code operations:too complex. ignoring.");
"too complex. ignoring.");
return 0; return 0;
} else if (api->match_icmp_type_num > 1 && } else if (api->match_icmp_type_num > 1 &&
!enumerate_icmp) { !enumerate_icmp) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match icmp code is enumerate" zlog_debug("BGP: match icmp code is enumerate, and icmp type is not. too complex. ignoring.");
", and icmp type is not."
" too complex. ignoring.");
return 0; return 0;
} }
} }
if (!bgp_pbr_extract(api->port, api->match_port_num, NULL)) { if (!bgp_pbr_extract(api->port, api->match_port_num, NULL)) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match port operations:" zlog_debug("BGP: match port operations:too complex. ignoring.");
"too complex. ignoring.");
return 0; return 0;
} }
if (api->match_packet_length_num) { if (api->match_packet_length_num) {
@ -572,8 +562,7 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)
NULL, FLOWSPEC_PKT_LEN); NULL, FLOWSPEC_PKT_LEN);
if (!ret) { if (!ret) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match packet length operations:" zlog_debug("BGP: match packet length operations:too complex. ignoring.");
"too complex. ignoring.");
return 0; return 0;
} }
} }
@ -582,8 +571,7 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)
OPERATOR_UNARY_OR | OPERATOR_UNARY_AND, OPERATOR_UNARY_OR | OPERATOR_UNARY_AND,
NULL, FLOWSPEC_DSCP)) { NULL, FLOWSPEC_DSCP)) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match DSCP operations:" zlog_debug("BGP: match DSCP operations:too complex. ignoring.");
"too complex. ignoring.");
return 0; return 0;
} }
} }
@ -629,16 +617,14 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)
if (api->match_src_port_num + api->match_dst_port_num + if (api->match_src_port_num + api->match_dst_port_num +
api->match_port_num > 3) { api->match_port_num > 3) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match multiple port operations:" zlog_debug("BGP: match multiple port operations: too complex. ignoring.");
" too complex. ignoring.");
return 0; return 0;
} }
if ((api->match_src_port_num || api->match_dst_port_num if ((api->match_src_port_num || api->match_dst_port_num
|| api->match_port_num) && (api->match_icmp_type_num || api->match_port_num) && (api->match_icmp_type_num
|| api->match_icmp_code_num)) { || api->match_icmp_code_num)) {
if (BGP_DEBUG(pbr, PBR)) if (BGP_DEBUG(pbr, PBR))
zlog_debug("BGP: match multiple port/imcp operations:" zlog_debug("BGP: match multiple port/imcp operations: too complex. ignoring.");
" too complex. ignoring.");
return 0; return 0;
} }
/* iprule only supports redirect IP */ /* iprule only supports redirect IP */
@ -650,24 +636,21 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)
api->actions[i].u.r.rate == 0) { api->actions[i].u.r.rate == 0) {
if (BGP_DEBUG(pbr, PBR)) { if (BGP_DEBUG(pbr, PBR)) {
bgp_pbr_print_policy_route(api); bgp_pbr_print_policy_route(api);
zlog_debug("BGP: iprule match actions" zlog_debug("BGP: iprule match actions drop not supported");
" drop not supported");
} }
return 0; return 0;
} }
if (api->actions[i].action == ACTION_MARKING) { if (api->actions[i].action == ACTION_MARKING) {
if (BGP_DEBUG(pbr, PBR)) { if (BGP_DEBUG(pbr, PBR)) {
bgp_pbr_print_policy_route(api); bgp_pbr_print_policy_route(api);
zlog_warn("PBR: iprule set DSCP %u" zlog_warn("PBR: iprule set DSCP %u not supported",
" not supported",
api->actions[i].u.marking_dscp); api->actions[i].u.marking_dscp);
} }
} }
if (api->actions[i].action == ACTION_REDIRECT) { if (api->actions[i].action == ACTION_REDIRECT) {
if (BGP_DEBUG(pbr, PBR)) { if (BGP_DEBUG(pbr, PBR)) {
bgp_pbr_print_policy_route(api); bgp_pbr_print_policy_route(api);
zlog_warn("PBR: iprule redirect VRF %u" zlog_warn("PBR: iprule redirect VRF %u not supported",
" not supported",
api->actions[i].u.redirect_vrf); api->actions[i].u.redirect_vrf);
} }
} }
@ -677,9 +660,7 @@ static int bgp_pbr_validate_policy_route(struct bgp_pbr_entry_main *api)
!(api->match_bitmask & PREFIX_DST_PRESENT)) { !(api->match_bitmask & PREFIX_DST_PRESENT)) {
if (BGP_DEBUG(pbr, PBR)) { if (BGP_DEBUG(pbr, PBR)) {
bgp_pbr_print_policy_route(api); bgp_pbr_print_policy_route(api);
zlog_debug("BGP: match actions without src" zlog_debug("BGP: match actions without src or dst address can not operate. ignoring.");
" or dst address can not operate."
" ignoring.");
} }
return 0; return 0;
} }
@ -845,8 +826,7 @@ int bgp_pbr_build_and_validate_entry(const struct prefix *p,
if (valid_prefix && afi != family2afi(dst->family)) { if (valid_prefix && afi != family2afi(dst->family)) {
if (BGP_DEBUG(pbr, PBR)) { if (BGP_DEBUG(pbr, PBR)) {
bgp_pbr_print_policy_route(api); bgp_pbr_print_policy_route(api);
zlog_debug("%s: inconsistency:" zlog_debug("%s: inconsistency: no match for afi src and dst (%u/%u)",
" no match for afi src and dst (%u/%u)",
__func__, afi, family2afi(dst->family)); __func__, afi, family2afi(dst->family));
} }
return -1; return -1;
@ -2097,8 +2077,7 @@ static void bgp_pbr_policyroute_add_to_zebra_unit(struct bgp *bgp,
listnode_lookup_nocheck(extra->bgp_fs_iprule, listnode_lookup_nocheck(extra->bgp_fs_iprule,
bpr)) { bpr)) {
if (BGP_DEBUG(pbr, PBR_ERROR)) if (BGP_DEBUG(pbr, PBR_ERROR))
zlog_err("%s: entry %p/%p already " zlog_err("%s: entry %p/%p already installed in bgp pbr iprule",
"installed in bgp pbr iprule",
__func__, path, bpr); __func__, path, bpr);
return; return;
} }

View file

@ -1690,8 +1690,7 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi,
&& (IPV4_ADDR_SAME(&onlypeer->remote_id, &piattr->originator_id))) { && (IPV4_ADDR_SAME(&onlypeer->remote_id, &piattr->originator_id))) {
if (bgp_debug_update(NULL, p, subgrp->update_group, 0)) if (bgp_debug_update(NULL, p, subgrp->update_group, 0))
zlog_debug( zlog_debug(
"%s [Update:SEND] %s originator-id is same as " "%s [Update:SEND] %s originator-id is same as remote router-id",
"remote router-id",
onlypeer->host, onlypeer->host,
prefix2str(p, buf, sizeof(buf))); prefix2str(p, buf, sizeof(buf)));
return false; return false;
@ -1729,8 +1728,7 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi,
&& aspath_loop_check(piattr->aspath, onlypeer->as)) { && aspath_loop_check(piattr->aspath, onlypeer->as)) {
if (bgp_debug_update(NULL, p, subgrp->update_group, 0)) if (bgp_debug_update(NULL, p, subgrp->update_group, 0))
zlog_debug( zlog_debug(
"%s [Update:SEND] suppress announcement to peer AS %u " "%s [Update:SEND] suppress announcement to peer AS %u that is part of AS path.",
"that is part of AS path.",
onlypeer->host, onlypeer->as); onlypeer->host, onlypeer->as);
return false; return false;
} }
@ -1740,8 +1738,7 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi,
if (aspath_loop_check(piattr->aspath, bgp->confed_id)) { if (aspath_loop_check(piattr->aspath, bgp->confed_id)) {
if (bgp_debug_update(NULL, p, subgrp->update_group, 0)) if (bgp_debug_update(NULL, p, subgrp->update_group, 0))
zlog_debug( zlog_debug(
"%s [Update:SEND] suppress announcement to peer AS %u" "%s [Update:SEND] suppress announcement to peer AS %u is AS path.",
" is AS path.",
peer->host, bgp->confed_id); peer->host, bgp->confed_id);
return false; return false;
} }
@ -10939,8 +10936,7 @@ DEFUN (show_ip_bgp_json,
DEFUN (show_ip_bgp_route, DEFUN (show_ip_bgp_route,
show_ip_bgp_route_cmd, show_ip_bgp_route_cmd,
"show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]]" "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]]<A.B.C.D|A.B.C.D/M|X:X::X:X|X:X::X:X/M> [<bestpath|multipath>] [json]",
"<A.B.C.D|A.B.C.D/M|X:X::X:X|X:X::X:X/M> [<bestpath|multipath>] [json]",
SHOW_STR SHOW_STR
IP_STR IP_STR
BGP_STR BGP_STR
@ -11809,8 +11805,7 @@ static int bgp_peer_counts(struct vty *vty, struct peer *peer, afi_t afi,
DEFUN (show_ip_bgp_instance_neighbor_prefix_counts, DEFUN (show_ip_bgp_instance_neighbor_prefix_counts,
show_ip_bgp_instance_neighbor_prefix_counts_cmd, show_ip_bgp_instance_neighbor_prefix_counts_cmd,
"show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] " "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] neighbors <A.B.C.D|X:X::X:X|WORD> prefix-counts [json]",
"neighbors <A.B.C.D|X:X::X:X|WORD> prefix-counts [json]",
SHOW_STR SHOW_STR
IP_STR IP_STR
BGP_STR BGP_STR
@ -12304,8 +12299,7 @@ static int peer_adj_routes(struct vty *vty, struct peer *peer, afi_t afi,
DEFUN (show_ip_bgp_instance_neighbor_advertised_route, DEFUN (show_ip_bgp_instance_neighbor_advertised_route,
show_ip_bgp_instance_neighbor_advertised_route_cmd, show_ip_bgp_instance_neighbor_advertised_route_cmd,
"show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] " "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] neighbors <A.B.C.D|X:X::X:X|WORD> <advertised-routes|received-routes|filtered-routes> [route-map WORD] [json]",
"neighbors <A.B.C.D|X:X::X:X|WORD> <advertised-routes|received-routes|filtered-routes> [route-map WORD] [json]",
SHOW_STR SHOW_STR
IP_STR IP_STR
BGP_STR BGP_STR
@ -12501,8 +12495,7 @@ DEFUN (show_ip_bgp_flowspec_routes_detailed,
DEFUN (show_ip_bgp_neighbor_routes, DEFUN (show_ip_bgp_neighbor_routes,
show_ip_bgp_neighbor_routes_cmd, show_ip_bgp_neighbor_routes_cmd,
"show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] " "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] neighbors <A.B.C.D|X:X::X:X|WORD> <flap-statistics|dampened-routes|routes> [json]",
"neighbors <A.B.C.D|X:X::X:X|WORD> <flap-statistics|dampened-routes|routes> [json]",
SHOW_STR SHOW_STR
IP_STR IP_STR
BGP_STR BGP_STR

View file

@ -3756,8 +3756,7 @@ static void bgp_route_map_process_update(struct bgp *bgp, const char *rmap_name,
if (BGP_DEBUG(zebra, ZEBRA)) if (BGP_DEBUG(zebra, ZEBRA))
zlog_debug( zlog_debug(
"Processing route_map %s update on " "Processing route_map %s update on table map",
"table map",
rmap_name); rmap_name);
if (route_update) if (route_update)
bgp_zebra_announce_table(bgp, afi, safi); bgp_zebra_announce_table(bgp, afi, safi);

View file

@ -1123,9 +1123,7 @@ DEFUN_HIDDEN (no_rpki_synchronisation_timeout,
DEFPY (rpki_cache, DEFPY (rpki_cache,
rpki_cache_cmd, rpki_cache_cmd,
"rpki cache <A.B.C.D|WORD>" "rpki cache <A.B.C.D|WORD><TCPPORT|(1-65535)$sshport SSH_UNAME SSH_PRIVKEY SSH_PUBKEY [SERVER_PUBKEY]> preference (1-255)",
"<TCPPORT|(1-65535)$sshport SSH_UNAME SSH_PRIVKEY SSH_PUBKEY [SERVER_PUBKEY]> "
"preference (1-255)",
RPKI_OUTPUT_STRING RPKI_OUTPUT_STRING
"Install a cache server to current group\n" "Install a cache server to current group\n"
"IP address of cache server\n Hostname of cache server\n" "IP address of cache server\n Hostname of cache server\n"
@ -1161,9 +1159,7 @@ DEFPY (rpki_cache,
#else #else
return_value = SUCCESS; return_value = SUCCESS;
vty_out(vty, vty_out(vty,
"ssh sockets are not supported. " "ssh sockets are not supported. Please recompile rtrlib and frr with ssh support. If you want to use it\n");
"Please recompile rtrlib and frr with ssh support. "
"If you want to use it\n");
#endif #endif
} else { // use tcp connection } else { // use tcp connection
return_value = add_tcp_cache(cache, tcpport, preference); return_value = add_tcp_cache(cache, tcpport, preference);
@ -1323,8 +1319,7 @@ DEFUN (show_rpki_cache_server,
#if defined(FOUND_SSH) #if defined(FOUND_SSH)
} else if (cache->type == SSH) { } else if (cache->type == SSH) {
vty_out(vty, vty_out(vty,
"host: %s port: %d username: %s " "host: %s port: %d username: %s server_hostkey_path: %s client_privkey_path: %s\n",
"server_hostkey_path: %s client_privkey_path: %s\n",
cache->tr_config.ssh_config->host, cache->tr_config.ssh_config->host,
cache->tr_config.ssh_config->port, cache->tr_config.ssh_config->port,
cache->tr_config.ssh_config->username, cache->tr_config.ssh_config->username,

View file

@ -1077,8 +1077,7 @@ static void update_subgroup_merge(struct update_subgroup *subgrp,
if (BGP_DEBUG(update_groups, UPDATE_GROUPS)) if (BGP_DEBUG(update_groups, UPDATE_GROUPS))
zlog_debug("u%" PRIu64 ":s%" PRIu64 zlog_debug("u%" PRIu64 ":s%" PRIu64
" (%d peers) merged into u%" PRIu64 ":s%" PRIu64 " (%d peers) merged into u%" PRIu64 ":s%" PRIu64
", " ", trigger: %s",
"trigger: %s",
subgrp->update_group->id, subgrp->id, peer_count, subgrp->update_group->id, subgrp->id, peer_count,
target->update_group->id, target->id, target->update_group->id, target->id,
reason ? reason : "unknown"); reason ? reason : "unknown");

View file

@ -4330,8 +4330,7 @@ static int peer_flag_modify_vty(struct vty *vty, const char *ip_str,
*/ */
if (peer->conf_if && (flag == PEER_FLAG_DISABLE_CONNECTED_CHECK)) { if (peer->conf_if && (flag == PEER_FLAG_DISABLE_CONNECTED_CHECK)) {
vty_out(vty, vty_out(vty,
"%s is directly connected peer, cannot accept disable-" "%s is directly connected peer, cannot accept disable-connected-check\n",
"connected-check\n",
ip_str); ip_str);
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }

View file

@ -2707,8 +2707,7 @@ int peer_group_listen_range_del(struct peer_group *group, struct prefix *range)
if (prefix_match(prefix, &prefix2)) { if (prefix_match(prefix, &prefix2)) {
if (bgp_debug_neighbor_events(peer)) if (bgp_debug_neighbor_events(peer))
zlog_debug( zlog_debug(
"Deleting dynamic neighbor %s group %s upon " "Deleting dynamic neighbor %s group %s upon delete of listen range %s",
"delete of listen range %s",
peer->host, group->name, buf); peer->host, group->name, buf);
peer_delete(peer); peer_delete(peer);
} }

View file

@ -3747,8 +3747,7 @@ int rfapi_set_autord_from_vn(struct prefix_rd *rd, struct rfapi_ip_addr *vn)
vnc_zlog_debug_verbose("%s: auto-assigning RD", __func__); vnc_zlog_debug_verbose("%s: auto-assigning RD", __func__);
if (vn->addr_family != AF_INET && vn->addr_family != AF_INET6) { if (vn->addr_family != AF_INET && vn->addr_family != AF_INET6) {
vnc_zlog_debug_verbose( vnc_zlog_debug_verbose(
"%s: can't auto-assign RD, VN addr family is not IPv4" "%s: can't auto-assign RD, VN addr family is not IPv4|v6",
"|v6",
__func__); __func__);
return EAFNOSUPPORT; return EAFNOSUPPORT;
} }

View file

@ -646,9 +646,7 @@ static void rfapiRibBi2Ri(struct bgp_path_info *bpi, struct rfapi_info *ri,
pEncap->length - 2); pEncap->length - 2);
if (hop->length > pEncap->length - 2) { if (hop->length > pEncap->length - 2) {
zlog_warn( zlog_warn(
"%s: VNC subtlv length mismatch: " "%s: VNC subtlv length mismatch: RFP option says %d, attr says %d (shrinking)",
"RFP option says %d, attr says %d "
"(shrinking)",
__func__, hop->length, __func__, hop->length,
pEncap->length - 2); pEncap->length - 2);
hop->length = pEncap->length - 2; hop->length = pEncap->length - 2;

View file

@ -234,8 +234,7 @@ void show_ip_eigrp_topology_header(struct vty *vty, struct eigrp *eigrp)
vty_out(vty, "\nEIGRP Topology Table for AS(%d)/ID(%s)\n\n", eigrp->AS, vty_out(vty, "\nEIGRP Topology Table for AS(%d)/ID(%s)\n\n", eigrp->AS,
inet_ntoa(eigrp->router_id)); inet_ntoa(eigrp->router_id));
vty_out(vty, vty_out(vty,
"Codes: P - Passive, A - Active, U - Update, Q - Query, " "Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply\n r - reply Status, s - sia Status\n\n");
"R - Reply\n r - reply Status, s - sia Status\n\n");
} }
void show_ip_eigrp_prefix_entry(struct vty *vty, struct eigrp_prefix_entry *tn) void show_ip_eigrp_prefix_entry(struct vty *vty, struct eigrp_prefix_entry *tn)

View file

@ -160,8 +160,7 @@ int eigrp_if_ipmulticast(struct eigrp *top, struct prefix *p,
ret = setsockopt_ipv4_multicast_if(top->fd, p->u.prefix4, ifindex); ret = setsockopt_ipv4_multicast_if(top->fd, p->u.prefix4, ifindex);
if (ret < 0) if (ret < 0)
zlog_warn( zlog_warn(
"can't setsockopt IP_MULTICAST_IF (fd %d, addr %s, " "can't setsockopt IP_MULTICAST_IF (fd %d, addr %s, ifindex %u): %s",
"ifindex %u): %s",
top->fd, inet_ntoa(p->u.prefix4), ifindex, top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno)); safe_strerror(errno));
@ -179,9 +178,7 @@ int eigrp_if_add_allspfrouters(struct eigrp *top, struct prefix *p,
htonl(EIGRP_MULTICAST_ADDRESS), ifindex); htonl(EIGRP_MULTICAST_ADDRESS), ifindex);
if (ret < 0) if (ret < 0)
zlog_warn( zlog_warn(
"can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, " "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?",
"ifindex %u, AllSPFRouters): %s; perhaps a kernel limit "
"on # of multicast group memberships has been exceeded?",
top->fd, inet_ntoa(p->u.prefix4), ifindex, top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno)); safe_strerror(errno));
else else
@ -201,8 +198,7 @@ int eigrp_if_drop_allspfrouters(struct eigrp *top, struct prefix *p,
htonl(EIGRP_MULTICAST_ADDRESS), ifindex); htonl(EIGRP_MULTICAST_ADDRESS), ifindex);
if (ret < 0) if (ret < 0)
zlog_warn( zlog_warn(
"can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, " "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllSPFRouters): %s",
"ifindex %u, AllSPFRouters): %s",
top->fd, inet_ntoa(p->u.prefix4), ifindex, top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno)); safe_strerror(errno));
else else

View file

@ -449,8 +449,7 @@ int eigrp_write(struct thread *thread)
if (ret < 0) if (ret < 0)
zlog_warn( zlog_warn(
"*** sendmsg in eigrp_write failed to %s, " "*** sendmsg in eigrp_write failed to %s, id %d, off %d, len %d, interface %s, mtu %u: %s",
"id %d, off %d, len %d, interface %s, mtu %u: %s",
inet_ntoa(iph.ip_dst), iph.ip_id, iph.ip_off, inet_ntoa(iph.ip_dst), iph.ip_id, iph.ip_off,
iph.ip_len, ei->ifp->name, ei->ifp->mtu, iph.ip_len, ei->ifp->name, ei->ifp->mtu,
safe_strerror(errno)); safe_strerror(errno));
@ -578,8 +577,7 @@ int eigrp_read(struct thread *thread)
if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV)) if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV))
zlog_debug( zlog_debug(
"ignoring packet from router %s sent to %s, " "ignoring packet from router %s sent to %s, received on a passive interface, %s",
"received on a passive interface, %s",
inet_ntop(AF_INET, &eigrph->vrid, buf[0], inet_ntop(AF_INET, &eigrph->vrid, buf[0],
sizeof(buf[0])), sizeof(buf[0])),
inet_ntop(AF_INET, &iph->ip_dst, buf[1], inet_ntop(AF_INET, &iph->ip_dst, buf[1],
@ -736,8 +734,7 @@ static struct stream *eigrp_recv_packet(struct eigrp *eigrp,
if ((unsigned int)ret < sizeof(*iph)) /* ret must be > 0 now */ if ((unsigned int)ret < sizeof(*iph)) /* ret must be > 0 now */
{ {
zlog_warn( zlog_warn(
"eigrp_recv_packet: discarding runt packet of length %d " "eigrp_recv_packet: discarding runt packet of length %d (ip header size is %u)",
"(ip header size is %u)",
ret, (unsigned int)sizeof(*iph)); ret, (unsigned int)sizeof(*iph));
return NULL; return NULL;
} }
@ -782,8 +779,7 @@ static struct stream *eigrp_recv_packet(struct eigrp *eigrp,
if (ret != ip_len) { if (ret != ip_len) {
zlog_warn( zlog_warn(
"eigrp_recv_packet read length mismatch: ip_len is %d, " "eigrp_recv_packet read length mismatch: ip_len is %d, but recvmsg returned %d",
"but recvmsg returned %d",
ip_len, ret); ip_len, ret);
return NULL; return NULL;
} }

View file

@ -273,8 +273,7 @@ int isis_send_pdu_bcast(struct isis_circuit *circuit, int level)
buflen = stream_get_endp(circuit->snd_stream) + LLC_LEN + ETHER_HDR_LEN; buflen = stream_get_endp(circuit->snd_stream) + LLC_LEN + ETHER_HDR_LEN;
if (buflen > sizeof(sock_buff)) { if (buflen > sizeof(sock_buff)) {
zlog_warn( zlog_warn(
"isis_send_pdu_bcast: sock_buff size %zu is less than " "isis_send_pdu_bcast: sock_buff size %zu is less than output pdu size %zu on circuit %s",
"output pdu size %zu on circuit %s",
sizeof(sock_buff), buflen, circuit->interface->name); sizeof(sock_buff), buflen, circuit->interface->name);
return ISIS_WARNING; return ISIS_WARNING;
} }

View file

@ -914,15 +914,13 @@ void isis_circuit_print_vty(struct isis_circuit *circuit, struct vty *vty,
vty_out(vty, ", Active neighbors: %u\n", vty_out(vty, ", Active neighbors: %u\n",
circuit->upadjcount[0]); circuit->upadjcount[0]);
vty_out(vty, vty_out(vty,
" Hello interval: %u, " " Hello interval: %u, Holddown count: %u %s\n",
"Holddown count: %u %s\n",
circuit->hello_interval[0], circuit->hello_interval[0],
circuit->hello_multiplier[0], circuit->hello_multiplier[0],
(circuit->pad_hellos ? "(pad)" (circuit->pad_hellos ? "(pad)"
: "(no-pad)")); : "(no-pad)"));
vty_out(vty, vty_out(vty,
" CNSP interval: %u, " " CNSP interval: %u, PSNP interval: %u\n",
"PSNP interval: %u\n",
circuit->csnp_interval[0], circuit->csnp_interval[0],
circuit->psnp_interval[0]); circuit->psnp_interval[0]);
if (circuit->circ_type == CIRCUIT_T_BROADCAST) if (circuit->circ_type == CIRCUIT_T_BROADCAST)
@ -948,15 +946,13 @@ void isis_circuit_print_vty(struct isis_circuit *circuit, struct vty *vty,
vty_out(vty, ", Active neighbors: %u\n", vty_out(vty, ", Active neighbors: %u\n",
circuit->upadjcount[1]); circuit->upadjcount[1]);
vty_out(vty, vty_out(vty,
" Hello interval: %u, " " Hello interval: %u, Holddown count: %u %s\n",
"Holddown count: %u %s\n",
circuit->hello_interval[1], circuit->hello_interval[1],
circuit->hello_multiplier[1], circuit->hello_multiplier[1],
(circuit->pad_hellos ? "(pad)" (circuit->pad_hellos ? "(pad)"
: "(no-pad)")); : "(no-pad)"));
vty_out(vty, vty_out(vty,
" CNSP interval: %u, " " CNSP interval: %u, PSNP interval: %u\n",
"PSNP interval: %u\n",
circuit->csnp_interval[1], circuit->csnp_interval[1],
circuit->psnp_interval[1]); circuit->psnp_interval[1]);
if (circuit->circ_type == CIRCUIT_T_BROADCAST) if (circuit->circ_type == CIRCUIT_T_BROADCAST)

View file

@ -1111,9 +1111,7 @@ DEFPY(isis_mpls_te_inter_as, isis_mpls_te_inter_as_cmd,
* XPath: /frr-isisd:isis/instance/default-information-originate * XPath: /frr-isisd:isis/instance/default-information-originate
*/ */
DEFPY(isis_default_originate, isis_default_originate_cmd, DEFPY(isis_default_originate, isis_default_originate_cmd,
"[no] default-information originate <ipv4|ipv6>$ip" "[no] default-information originate <ipv4|ipv6>$ip <level-1|level-2>$level [always]$always [{metric (0-16777215)$metric|route-map WORD$rmap}]",
" <level-1|level-2>$level [always]$always"
" [{metric (0-16777215)$metric|route-map WORD$rmap}]",
NO_STR NO_STR
"Control distribution of default information\n" "Control distribution of default information\n"
"Distribute a default route\n" "Distribute a default route\n"
@ -1190,9 +1188,7 @@ void cli_show_isis_def_origin_ipv6(struct vty *vty, struct lyd_node *dnode,
*/ */
DEFPY(isis_redistribute, isis_redistribute_cmd, DEFPY(isis_redistribute, isis_redistribute_cmd,
"[no] redistribute <ipv4|ipv6>$ip " PROTO_REDIST_STR "[no] redistribute <ipv4|ipv6>$ip " PROTO_REDIST_STR
"$proto" "$proto <level-1|level-2>$level [{metric (0-16777215)|route-map WORD}]",
" <level-1|level-2>$level"
" [{metric (0-16777215)|route-map WORD}]",
NO_STR REDIST_STR NO_STR REDIST_STR
"Redistribute IPv4 routes\n" "Redistribute IPv4 routes\n"
"Redistribute IPv6 routes\n" PROTO_REDIST_HELP "Redistribute IPv6 routes\n" PROTO_REDIST_HELP
@ -1250,15 +1246,7 @@ void cli_show_isis_redistribute_ipv6(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-isisd:isis/instance/multi-topology * XPath: /frr-isisd:isis/instance/multi-topology
*/ */
DEFPY(isis_topology, isis_topology_cmd, DEFPY(isis_topology, isis_topology_cmd,
"[no] topology " "[no] topology <ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology [overload]$overload",
"<ipv4-unicast"
"|ipv4-mgmt"
"|ipv6-unicast"
"|ipv4-multicast"
"|ipv6-multicast"
"|ipv6-mgmt"
"|ipv6-dstsrc>$topology "
"[overload]$overload",
NO_STR NO_STR
"Configure IS-IS topologies\n" "Configure IS-IS topologies\n"
"IPv4 unicast topology\n" "IPv4 unicast topology\n"
@ -2011,15 +1999,7 @@ void cli_show_ip_isis_psnp_interval(struct vty *vty, struct lyd_node *dnode,
* XPath: /frr-interface:lib/interface/frr-isisd:isis/multi-topology * XPath: /frr-interface:lib/interface/frr-isisd:isis/multi-topology
*/ */
DEFPY(circuit_topology, circuit_topology_cmd, DEFPY(circuit_topology, circuit_topology_cmd,
"[no] isis topology" "[no] isis topology<ipv4-unicast|ipv4-mgmt|ipv6-unicast|ipv4-multicast|ipv6-multicast|ipv6-mgmt|ipv6-dstsrc>$topology",
"<ipv4-unicast"
"|ipv4-mgmt"
"|ipv6-unicast"
"|ipv4-multicast"
"|ipv6-multicast"
"|ipv6-mgmt"
"|ipv6-dstsrc"
">$topology",
NO_STR NO_STR
"IS-IS routing protocol\n" "IS-IS routing protocol\n"
"Configure interface IS-IS topologies\n" "Configure interface IS-IS topologies\n"

View file

@ -566,8 +566,7 @@ int isis_send_pdu_bcast(struct isis_circuit *circuit, int level)
buflen = stream_get_endp(circuit->snd_stream) + LLC_LEN; buflen = stream_get_endp(circuit->snd_stream) + LLC_LEN;
if ((size_t)buflen > sizeof(sock_buff)) { if ((size_t)buflen > sizeof(sock_buff)) {
zlog_warn( zlog_warn(
"isis_send_pdu_bcast: sock_buff size %zu is less than " "isis_send_pdu_bcast: sock_buff size %zu is less than output pdu size %d on circuit %s",
"output pdu size %d on circuit %s",
sizeof(sock_buff), buflen, circuit->interface->name); sizeof(sock_buff), buflen, circuit->interface->name);
return ISIS_WARNING; return ISIS_WARNING;
} }

View file

@ -1413,8 +1413,7 @@ int _lsp_regenerate_schedule(struct isis_area *area, int level,
return ISIS_ERROR; return ISIS_ERROR;
sched_debug( sched_debug(
"ISIS (%s): Scheduling regeneration of %s LSPs, %sincluding PSNs" "ISIS (%s): Scheduling regeneration of %s LSPs, %sincluding PSNs Caller: %s %s:%d",
" Caller: %s %s:%d",
area->area_tag, circuit_t2string(level), area->area_tag, circuit_t2string(level),
all_pseudo ? "" : "not ", all_pseudo ? "" : "not ",
func, file, line); func, file, line);
@ -1444,8 +1443,7 @@ int _lsp_regenerate_schedule(struct isis_area *area, int level,
struct timeval remain = thread_timer_remain( struct timeval remain = thread_timer_remain(
area->t_lsp_refresh[lvl - 1]); area->t_lsp_refresh[lvl - 1]);
sched_debug( sched_debug(
"ISIS (%s): Regeneration is already pending, nothing todo." "ISIS (%s): Regeneration is already pending, nothing todo. (Due in %lld.%03lld seconds)",
" (Due in %lld.%03lld seconds)",
area->area_tag, (long long)remain.tv_sec, area->area_tag, (long long)remain.tv_sec,
(long long)remain.tv_usec / 1000); (long long)remain.tv_usec / 1000);
continue; continue;
@ -1817,8 +1815,7 @@ int lsp_regenerate_schedule_pseudo(struct isis_circuit *circuit, int level)
struct timeval remain = thread_timer_remain( struct timeval remain = thread_timer_remain(
circuit->u.bc.t_refresh_pseudo_lsp[lvl - 1]); circuit->u.bc.t_refresh_pseudo_lsp[lvl - 1]);
sched_debug( sched_debug(
"ISIS (%s): Regenerate is already pending, nothing todo." "ISIS (%s): Regenerate is already pending, nothing todo. (Due in %lld.%03lld seconds)",
" (Due in %lld.%03lld seconds)",
area->area_tag, (long long)remain.tv_sec, area->area_tag, (long long)remain.tv_sec,
(long long)remain.tv_usec / 1000); (long long)remain.tv_usec / 1000);
continue; continue;
@ -1851,8 +1848,7 @@ int lsp_regenerate_schedule_pseudo(struct isis_circuit *circuit, int level)
} else { } else {
timeout = 100; timeout = 100;
sched_debug( sched_debug(
"ISIS (%s): Last generation was more than lsp_gen_interval ago." "ISIS (%s): Last generation was more than lsp_gen_interval ago. Scheduling for execution in %ld ms.",
" Scheduling for execution in %ld ms.",
area->area_tag, timeout); area->area_tag, timeout);
} }
@ -1930,8 +1926,7 @@ int lsp_tick(struct thread *thread)
if (lsp->age_out == 0) { if (lsp->age_out == 0) {
zlog_debug( zlog_debug(
"ISIS-Upd (%s): L%u LSP %s seq " "ISIS-Upd (%s): L%u LSP %s seq 0x%08" PRIx32 " aged out",
"0x%08" PRIx32 " aged out",
area->area_tag, lsp->level, area->area_tag, lsp->level,
rawlspid_print(lsp->hdr.lsp_id), rawlspid_print(lsp->hdr.lsp_id),
lsp->hdr.seqno); lsp->hdr.seqno);

View file

@ -185,8 +185,7 @@ FRR_DAEMON_INFO(isisd, ISIS, .vty_port = ISISD_VTY_PORT,
.proghelp = "Implementation of the IS-IS routing protocol.", .proghelp = "Implementation of the IS-IS routing protocol.",
#endif #endif
.copyright = .copyright =
"Copyright (c) 2001-2002 Sampo Saaristo," "Copyright (c) 2001-2002 Sampo Saaristo, Ofer Wald and Hannes Gredler",
" Ofer Wald and Hannes Gredler",
.signals = isisd_signals, .signals = isisd_signals,
.n_signals = array_size(isisd_signals), .n_signals = array_size(isisd_signals),

View file

@ -427,8 +427,7 @@ static int process_p2p_hello(struct iih_info *iih)
if (IS_DEBUG_ADJ_PACKETS) { if (IS_DEBUG_ADJ_PACKETS) {
zlog_debug( zlog_debug(
"ISIS-Adj (%s): Rcvd P2P IIH from (%s), cir type %s," "ISIS-Adj (%s): Rcvd P2P IIH from (%s), cir type %s, cir id %hhu, length %" PRIu16,
" cir id %hhu, length %" PRIu16,
iih->circuit->area->area_tag, iih->circuit->area->area_tag,
iih->circuit->interface->name, iih->circuit->interface->name,
circuit_t2string(iih->circuit->is_type), circuit_t2string(iih->circuit->is_type),
@ -900,8 +899,7 @@ static int process_lsp(uint8_t pdu_type, struct isis_circuit *circuit,
/* 7.3.15.1 a) 1 - external domain circuit will discard lsps */ /* 7.3.15.1 a) 1 - external domain circuit will discard lsps */
if (circuit->ext_domain) { if (circuit->ext_domain) {
zlog_debug( zlog_debug(
"ISIS-Upd (%s): LSP %s received at level %d over circuit with " "ISIS-Upd (%s): LSP %s received at level %d over circuit with externalDomain = true",
"externalDomain = true",
circuit->area->area_tag, rawlspid_print(hdr.lsp_id), circuit->area->area_tag, rawlspid_print(hdr.lsp_id),
level); level);
return ISIS_WARNING; return ISIS_WARNING;
@ -910,8 +908,7 @@ static int process_lsp(uint8_t pdu_type, struct isis_circuit *circuit,
/* 7.3.15.1 a) 2,3 - manualL2OnlyMode not implemented */ /* 7.3.15.1 a) 2,3 - manualL2OnlyMode not implemented */
if (!(circuit->is_type & level)) { if (!(circuit->is_type & level)) {
zlog_debug( zlog_debug(
"ISIS-Upd (%s): LSP %s received at level %d over circuit of" "ISIS-Upd (%s): LSP %s received at level %d over circuit of type %s",
" type %s",
circuit->area->area_tag, rawlspid_print(hdr.lsp_id), circuit->area->area_tag, rawlspid_print(hdr.lsp_id),
level, circuit_t2string(circuit->is_type)); level, circuit_t2string(circuit->is_type));
return ISIS_WARNING; return ISIS_WARNING;
@ -1125,9 +1122,7 @@ dontcheckadj:
} }
if (IS_DEBUG_UPDATE_PACKETS) if (IS_DEBUG_UPDATE_PACKETS)
zlog_debug( zlog_debug(
"ISIS-Upd (%s): (1) " "ISIS-Upd (%s): (1) re-originating LSP %s new seq 0x%08" PRIx32,
"re-originating LSP %s new seq "
"0x%08" PRIx32,
circuit->area->area_tag, circuit->area->area_tag,
rawlspid_print(hdr.lsp_id), rawlspid_print(hdr.lsp_id),
lsp->hdr.seqno); lsp->hdr.seqno);
@ -1314,8 +1309,7 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
if (circuit->ext_domain) { if (circuit->ext_domain) {
zlog_debug( zlog_debug(
"ISIS-Snp (%s): Rcvd L%d %cSNP on %s, " "ISIS-Snp (%s): Rcvd L%d %cSNP on %s, skipping: circuit externalDomain = true",
"skipping: circuit externalDomain = true",
circuit->area->area_tag, level, typechar, circuit->area->area_tag, level, typechar,
circuit->interface->name); circuit->interface->name);
@ -1325,8 +1319,7 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
/* 7.3.15.2 a) 2,3 - manualL2OnlyMode not implemented */ /* 7.3.15.2 a) 2,3 - manualL2OnlyMode not implemented */
if (!(circuit->is_type & level)) { if (!(circuit->is_type & level)) {
zlog_debug( zlog_debug(
"ISIS-Snp (%s): Rcvd L%d %cSNP on %s, " "ISIS-Snp (%s): Rcvd L%d %cSNP on %s, skipping: circuit type %s does not match level %d",
"skipping: circuit type %s does not match level %d",
circuit->area->area_tag, level, typechar, circuit->area->area_tag, level, typechar,
circuit->interface->name, circuit->interface->name,
circuit_t2string(circuit->is_type), level); circuit_t2string(circuit->is_type), level);
@ -1338,8 +1331,7 @@ static int process_snp(uint8_t pdu_type, struct isis_circuit *circuit,
if (!is_csnp && (circuit->circ_type == CIRCUIT_T_BROADCAST) if (!is_csnp && (circuit->circ_type == CIRCUIT_T_BROADCAST)
&& !circuit->u.bc.is_dr[level - 1]) { && !circuit->u.bc.is_dr[level - 1]) {
zlog_debug( zlog_debug(
"ISIS-Snp (%s): Rcvd L%d %cSNP from %s on %s, " "ISIS-Snp (%s): Rcvd L%d %cSNP from %s on %s, skipping: we are not the DIS",
"skipping: we are not the DIS",
circuit->area->area_tag, level, typechar, circuit->area->area_tag, level, typechar,
snpa_print(ssnpa), circuit->interface->name); snpa_print(ssnpa), circuit->interface->name);

View file

@ -102,8 +102,7 @@ static int isis_multicast_join(int fd, int registerto, int if_num)
} }
#ifdef EXTREME_DEBUG #ifdef EXTREME_DEBUG
zlog_debug( zlog_debug(
"isis_multicast_join(): fd=%d, reg_to=%d, if_num=%d, " "isis_multicast_join(): fd=%d, reg_to=%d, if_num=%d, address = %02x:%02x:%02x:%02x:%02x:%02x",
"address = %02x:%02x:%02x:%02x:%02x:%02x",
fd, registerto, if_num, mreq.mr_address[0], mreq.mr_address[1], fd, registerto, if_num, mreq.mr_address[0], mreq.mr_address[1],
mreq.mr_address[2], mreq.mr_address[3], mreq.mr_address[4], mreq.mr_address[2], mreq.mr_address[3], mreq.mr_address[4],
mreq.mr_address[5]); mreq.mr_address[5]);
@ -247,16 +246,13 @@ int isis_recv_pdu_bcast(struct isis_circuit *circuit, uint8_t *ssnpa)
|| (s_addr.sll_ifindex != (int)circuit->interface->ifindex)) { || (s_addr.sll_ifindex != (int)circuit->interface->ifindex)) {
if (bytesread < 0) { if (bytesread < 0) {
zlog_warn( zlog_warn(
"isis_recv_packet_bcast(): ifname %s, fd %d, " "isis_recv_packet_bcast(): ifname %s, fd %d, bytesread %d, recvfrom(): %s",
"bytesread %d, recvfrom(): %s",
circuit->interface->name, circuit->fd, circuit->interface->name, circuit->fd,
bytesread, safe_strerror(errno)); bytesread, safe_strerror(errno));
} }
if (s_addr.sll_ifindex != (int)circuit->interface->ifindex) { if (s_addr.sll_ifindex != (int)circuit->interface->ifindex) {
zlog_warn( zlog_warn(
"packet is received on multiple interfaces: " "packet is received on multiple interfaces: socket interface %d, circuit interface %d, packet type %u",
"socket interface %d, circuit interface %d, "
"packet type %u",
s_addr.sll_ifindex, circuit->interface->ifindex, s_addr.sll_ifindex, circuit->interface->ifindex,
s_addr.sll_pkttype); s_addr.sll_pkttype);
} }

View file

@ -100,8 +100,7 @@ static void isis_redist_install(struct isis_area *area, int level,
if (!er_table) { if (!er_table) {
zlog_warn( zlog_warn(
"%s: External reachability table of area %s" "%s: External reachability table of area %s is not initialized.",
" is not initialized.",
__func__, area->area_tag); __func__, area->area_tag);
return; return;
} }
@ -134,8 +133,7 @@ static void isis_redist_uninstall(struct isis_area *area, int level,
if (!er_table) { if (!er_table) {
zlog_warn( zlog_warn(
"%s: External reachability table of area %s" "%s: External reachability table of area %s is not initialized.",
" is not initialized.",
__func__, area->area_tag); __func__, area->area_tag);
return; return;
} }
@ -310,8 +308,7 @@ void isis_redist_delete(int type, struct prefix *p, struct prefix_ipv6 *src_p)
char buf[BUFSIZ]; char buf[BUFSIZ];
prefix2str(p, buf, sizeof(buf)); prefix2str(p, buf, sizeof(buf));
zlog_warn( zlog_warn(
"%s: Got a delete for %s route %s, but that route" "%s: Got a delete for %s route %s, but that route was never added.",
" was never added.",
__func__, zebra_route_string(type), buf); __func__, zebra_route_string(type), buf);
if (ei_node) if (ei_node)
route_unlock_node(ei_node); route_unlock_node(ei_node);
@ -605,8 +602,7 @@ DEFUN (no_isis_redistribute,
DEFUN (isis_default_originate, DEFUN (isis_default_originate,
isis_default_originate_cmd, isis_default_originate_cmd,
"default-information originate <ipv4|ipv6>" "default-information originate <ipv4|ipv6> [always] [{metric (0-16777215)|route-map WORD}]",
" [always] [{metric (0-16777215)|route-map WORD}]",
"Control distribution of default information\n" "Control distribution of default information\n"
"Distribute a default route\n" "Distribute a default route\n"
"Distribute default route for IPv4\n" "Distribute default route for IPv4\n"

View file

@ -877,8 +877,7 @@ static int isis_spf_preload_tent(struct isis_spftree *spftree,
if (lsp == NULL if (lsp == NULL
|| lsp->hdr.rem_lifetime == 0) || lsp->hdr.rem_lifetime == 0)
zlog_warn( zlog_warn(
"ISIS-Spf: No LSP %s found for IS adjacency " "ISIS-Spf: No LSP %s found for IS adjacency L%d on %s (ID %u)",
"L%d on %s (ID %u)",
rawlspid_print(lsp_id), rawlspid_print(lsp_id),
spftree->level, spftree->level,
circuit->interface->name, circuit->interface->name,
@ -915,8 +914,7 @@ static int isis_spf_preload_tent(struct isis_spftree *spftree,
/* if no adj, we are the dis or error */ /* if no adj, we are the dis or error */
if (!adj && !circuit->u.bc.is_dr[spftree->level - 1]) { if (!adj && !circuit->u.bc.is_dr[spftree->level - 1]) {
zlog_warn( zlog_warn(
"ISIS-Spf: No adjacency found from root " "ISIS-Spf: No adjacency found from root to L%d DR %s on %s (ID %d)",
"to L%d DR %s on %s (ID %d)",
spftree->level, rawlspid_print(lsp_id), spftree->level, rawlspid_print(lsp_id),
circuit->interface->name, circuit->interface->name,
circuit->circuit_id); circuit->circuit_id);
@ -927,8 +925,7 @@ static int isis_spf_preload_tent(struct isis_spftree *spftree,
lsp_id); lsp_id);
if (lsp == NULL || lsp->hdr.rem_lifetime == 0) { if (lsp == NULL || lsp->hdr.rem_lifetime == 0) {
zlog_warn( zlog_warn(
"ISIS-Spf: No lsp (%p) found from root " "ISIS-Spf: No lsp (%p) found from root to L%d DR %s on %s (ID %d)",
"to L%d DR %s on %s (ID %d)",
(void *)lsp, spftree->level, (void *)lsp, spftree->level,
rawlspid_print(lsp_id), rawlspid_print(lsp_id),
circuit->interface->name, circuit->interface->name,
@ -1022,8 +1019,7 @@ static void add_to_paths(struct isis_spftree *spftree,
spftree->route_table); spftree->route_table);
else if (IS_DEBUG_SPF_EVENTS) else if (IS_DEBUG_SPF_EVENTS)
zlog_debug( zlog_debug(
"ISIS-Spf: no adjacencies do not install route for " "ISIS-Spf: no adjacencies do not install route for %s depth %d dist %d",
"%s depth %d dist %d",
vid2string(vertex, buff, sizeof(buff)), vid2string(vertex, buff, sizeof(buff)),
vertex->depth, vertex->d_N); vertex->depth, vertex->d_N);
} }
@ -1262,8 +1258,7 @@ int _isis_spf_schedule(struct isis_area *area, int level,
if (IS_DEBUG_SPF_EVENTS) { if (IS_DEBUG_SPF_EVENTS) {
zlog_debug( zlog_debug(
"ISIS-Spf (%s) L%d SPF schedule called, lastrun %d sec ago" "ISIS-Spf (%s) L%d SPF schedule called, lastrun %d sec ago Caller: %s %s:%d",
" Caller: %s %s:%d",
area->area_tag, level, diff, func, file, line); area->area_tag, level, diff, func, file, line);
} }

View file

@ -884,8 +884,7 @@ static int unpack_item_prefix_sid(uint16_t mtid, uint8_t len, struct stream *s,
: ISIS_SUBTLV_PREFIX_SID_SIZE + 1; : ISIS_SUBTLV_PREFIX_SID_SIZE + 1;
if (len != expected_size) { if (len != expected_size) {
sbuf_push(log, indent, sbuf_push(log, indent,
"TLV size differs from expected size. " "TLV size differs from expected size. (expected %u but got %" PRIu8 ")\n",
"(expected %u but got %" PRIu8 ")\n",
expected_size, len); expected_size, len);
return 1; return 1;
} }
@ -976,8 +975,7 @@ static int unpack_subtlv_ipv6_source_prefix(enum isis_tlv_context context,
if (tlv_len != 1 + PSIZE(p.prefixlen)) { if (tlv_len != 1 + PSIZE(p.prefixlen)) {
sbuf_push( sbuf_push(
log, indent, log, indent,
"TLV size differs from expected size for the prefixlen. " "TLV size differs from expected size for the prefixlen. (expected %u but got %" PRIu8 ")\n",
"(expected %u but got %" PRIu8 ")\n",
1 + PSIZE(p.prefixlen), tlv_len); 1 + PSIZE(p.prefixlen), tlv_len);
return 1; return 1;
} }
@ -4106,8 +4104,7 @@ int isis_unpack_tlvs(size_t avail_len, struct stream *stream,
sbuf_reset(&logbuf); sbuf_reset(&logbuf);
if (avail_len > STREAM_READABLE(stream)) { if (avail_len > STREAM_READABLE(stream)) {
sbuf_push(&logbuf, indent, sbuf_push(&logbuf, indent,
"Stream doesn't contain sufficient data. " "Stream doesn't contain sufficient data. Claimed %zu, available %zu\n",
"Claimed %zu, available %zu\n",
avail_len, STREAM_READABLE(stream)); avail_len, STREAM_READABLE(stream));
return 1; return 1;
} }

View file

@ -136,8 +136,7 @@ static void lsp_print_flooding(struct vty *vty, struct isis_lsp *lsp)
vty_out(vty, "%s ago)\n", buf); vty_out(vty, "%s ago)\n", buf);
if (lsp->flooding_circuit_scoped) { if (lsp->flooding_circuit_scoped) {
vty_out(vty, " Received as circuit-scoped LSP, so not " vty_out(vty, " Received as circuit-scoped LSP, so not flooded.\n");
"flooded.\n");
return; return;
} }
@ -437,8 +436,7 @@ isis_vty_lsp_gen_interval_set(struct vty *vty, int level, uint16_t interval)
if (interval >= area->lsp_refresh[lvl - 1]) { if (interval >= area->lsp_refresh[lvl - 1]) {
vty_out(vty, vty_out(vty,
"LSP gen interval %us must be less than " "LSP gen interval %us must be less than the LSP refresh interval %us\n",
"the LSP refresh interval %us\n",
interval, area->lsp_refresh[lvl - 1]); interval, area->lsp_refresh[lvl - 1]);
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }
@ -488,15 +486,13 @@ isis_vty_lsp_refresh_set(struct vty *vty, int level, uint16_t interval)
continue; continue;
if (interval <= area->lsp_gen_interval[lvl - 1]) { if (interval <= area->lsp_gen_interval[lvl - 1]) {
vty_out(vty, vty_out(vty,
"LSP refresh interval %us must be greater than " "LSP refresh interval %us must be greater than the configured LSP gen interval %us\n",
"the configured LSP gen interval %us\n",
interval, area->lsp_gen_interval[lvl - 1]); interval, area->lsp_gen_interval[lvl - 1]);
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }
if (interval > (area->max_lsp_lifetime[lvl - 1] - 300)) { if (interval > (area->max_lsp_lifetime[lvl - 1] - 300)) {
vty_out(vty, vty_out(vty,
"LSP refresh interval %us must be less than " "LSP refresh interval %us must be less than the configured LSP lifetime %us less 300\n",
"the configured LSP lifetime %us less 300\n",
interval, area->max_lsp_lifetime[lvl - 1]); interval, area->max_lsp_lifetime[lvl - 1]);
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }
@ -546,20 +542,17 @@ isis_vty_max_lsp_lifetime_set(struct vty *vty, int level, uint16_t interval)
if (refresh_interval < area->lsp_refresh[lvl - 1]) { if (refresh_interval < area->lsp_refresh[lvl - 1]) {
vty_out(vty, vty_out(vty,
"Level %d Max LSP lifetime %us must be 300s greater than " "Level %d Max LSP lifetime %us must be 300s greater than the configured LSP refresh interval %us\n",
"the configured LSP refresh interval %us\n",
lvl, interval, area->lsp_refresh[lvl - 1]); lvl, interval, area->lsp_refresh[lvl - 1]);
vty_out(vty, vty_out(vty,
"Automatically reducing level %d LSP refresh interval " "Automatically reducing level %d LSP refresh interval to %us\n",
"to %us\n",
lvl, refresh_interval); lvl, refresh_interval);
set_refresh_interval[lvl - 1] = 1; set_refresh_interval[lvl - 1] = 1;
if (refresh_interval if (refresh_interval
<= area->lsp_gen_interval[lvl - 1]) { <= area->lsp_gen_interval[lvl - 1]) {
vty_out(vty, vty_out(vty,
"LSP refresh interval %us must be greater than " "LSP refresh interval %us must be greater than the configured LSP gen interval %us\n",
"the configured LSP gen interval %us\n",
refresh_interval, refresh_interval,
area->lsp_gen_interval[lvl - 1]); area->lsp_gen_interval[lvl - 1]);
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
@ -845,8 +838,7 @@ DEFUN (isis_metric,
if (circuit->area && circuit->area->oldmetric == 1 if (circuit->area && circuit->area->oldmetric == 1
&& met > MAX_NARROW_LINK_METRIC) { && met > MAX_NARROW_LINK_METRIC) {
vty_out(vty, vty_out(vty,
"Invalid metric %d - should be <0-63> " "Invalid metric %d - should be <0-63> when narrow metric type enabled\n",
"when narrow metric type enabled\n",
met); met);
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }
@ -855,8 +847,7 @@ DEFUN (isis_metric,
if (circuit->area && circuit->area->newmetric == 1 if (circuit->area && circuit->area->newmetric == 1
&& met > MAX_WIDE_LINK_METRIC) { && met > MAX_WIDE_LINK_METRIC) {
vty_out(vty, vty_out(vty,
"Invalid metric %d - should be <0-16777215> " "Invalid metric %d - should be <0-16777215> when wide metric type enabled\n",
"when wide metric type enabled\n",
met); met);
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }

View file

@ -234,8 +234,7 @@ recv_hello(struct in_addr lsr_id, struct ldp_msg *msg, int af,
* check)". * check)".
*/ */
if (flags & F_HELLO_TARGETED) { if (flags & F_HELLO_TARGETED) {
log_debug("%s: lsr-id %s: invalid targeted hello " log_debug("%s: lsr-id %s: invalid targeted hello transport address %s", __func__, inet_ntoa(lsr_id),
"transport address %s", __func__, inet_ntoa(lsr_id),
log_addr(af, &trans_addr)); log_addr(af, &trans_addr));
return; return;
} }
@ -250,8 +249,7 @@ recv_hello(struct in_addr lsr_id, struct ldp_msg *msg, int af,
* targeted LDP Hello packet's source or destination addresses". * targeted LDP Hello packet's source or destination addresses".
*/ */
if (af == AF_INET6 && IN6_IS_SCOPE_EMBED(&src->v6)) { if (af == AF_INET6 && IN6_IS_SCOPE_EMBED(&src->v6)) {
log_debug("%s: lsr-id %s: targeted hello with " log_debug("%s: lsr-id %s: targeted hello with link-local source address", __func__,
"link-local source address", __func__,
inet_ntoa(lsr_id)); inet_ntoa(lsr_id));
return; return;
} }
@ -318,8 +316,7 @@ recv_hello(struct in_addr lsr_id, struct ldp_msg *msg, int af,
* send a fatal Notification message with status code of * send a fatal Notification message with status code of
* 'Transport Connection Mismatch' and reset the session". * 'Transport Connection Mismatch' and reset the session".
*/ */
log_debug("%s: lsr-id %s: remote transport preference does not " log_debug("%s: lsr-id %s: remote transport preference does not match the local preference", __func__, inet_ntoa(lsr_id));
"match the local preference", __func__, inet_ntoa(lsr_id));
if (nbr) if (nbr)
session_shutdown(nbr, S_TRANS_MISMTCH, msg->id, session_shutdown(nbr, S_TRANS_MISMTCH, msg->id,
msg->type); msg->type);
@ -359,8 +356,7 @@ recv_hello(struct in_addr lsr_id, struct ldp_msg *msg, int af,
if (nbr && nbr->af == af && if (nbr && nbr->af == af &&
(ldp_addrcmp(af, &nbr->raddr, &trans_addr) || (ldp_addrcmp(af, &nbr->raddr, &trans_addr) ||
nbr->raddr_scope != scope_id)) { nbr->raddr_scope != scope_id)) {
log_warnx("%s: lsr-id %s: hello packet advertising a different " log_warnx("%s: lsr-id %s: hello packet advertising a different transport address", __func__, inet_ntoa(lsr_id));
"transport address", __func__, inet_ntoa(lsr_id));
if (adj) if (adj)
adj_del(adj, S_SHUTDOWN); adj_del(adj, S_SHUTDOWN);
return; return;
@ -368,8 +364,7 @@ recv_hello(struct in_addr lsr_id, struct ldp_msg *msg, int af,
if (nbr == NULL) { if (nbr == NULL) {
nbrt = nbr_find_addr(af, &trans_addr); nbrt = nbr_find_addr(af, &trans_addr);
if (nbrt) { if (nbrt) {
log_debug("%s: transport address %s is already being " log_debug("%s: transport address %s is already being used by lsr-id %s", __func__, log_addr(af,
"used by lsr-id %s", __func__, log_addr(af,
&trans_addr), inet_ntoa(nbrt->id)); &trans_addr), inet_ntoa(nbrt->id));
if (adj) if (adj)
adj_del(adj, S_SHUTDOWN); adj_del(adj, S_SHUTDOWN);

View file

@ -146,8 +146,7 @@ recv_init(struct nbr *nbr, char *buf, uint16_t len)
nbr->flags |= F_NBR_CAP_DYNAMIC; nbr->flags |= F_NBR_CAP_DYNAMIC;
log_debug("%s: lsr-id %s announced the Dynamic " log_debug("%s: lsr-id %s announced the Dynamic Capability Announcement capability", __func__,
"Capability Announcement capability", __func__,
inet_ntoa(nbr->id)); inet_ntoa(nbr->id));
break; break;
case TLV_TYPE_TWCARD_CAP: case TLV_TYPE_TWCARD_CAP:
@ -166,8 +165,7 @@ recv_init(struct nbr *nbr, char *buf, uint16_t len)
nbr->flags |= F_NBR_CAP_TWCARD; nbr->flags |= F_NBR_CAP_TWCARD;
log_debug("%s: lsr-id %s announced the Typed Wildcard " log_debug("%s: lsr-id %s announced the Typed Wildcard FEC capability", __func__, inet_ntoa(nbr->id));
"FEC capability", __func__, inet_ntoa(nbr->id));
break; break;
case TLV_TYPE_UNOTIF_CAP: case TLV_TYPE_UNOTIF_CAP:
if (tlv_len != CAP_TLV_UNOTIF_LEN) { if (tlv_len != CAP_TLV_UNOTIF_LEN) {
@ -185,8 +183,7 @@ recv_init(struct nbr *nbr, char *buf, uint16_t len)
nbr->flags |= F_NBR_CAP_UNOTIF; nbr->flags |= F_NBR_CAP_UNOTIF;
log_debug("%s: lsr-id %s announced the Unrecognized " log_debug("%s: lsr-id %s announced the Unrecognized Notification capability", __func__,
"Notification capability", __func__,
inet_ntoa(nbr->id)); inet_ntoa(nbr->id));
break; break;
default: default:
@ -321,8 +318,7 @@ recv_capability(struct nbr *nbr, char *buf, uint16_t len)
else else
nbr->flags &= ~F_NBR_CAP_TWCARD; nbr->flags &= ~F_NBR_CAP_TWCARD;
log_debug("%s: lsr-id %s %s the Typed Wildcard FEC " log_debug("%s: lsr-id %s %s the Typed Wildcard FEC capability", __func__, inet_ntoa(nbr->id),
"capability", __func__, inet_ntoa(nbr->id),
(enable) ? "announced" : "withdrew"); (enable) ? "announced" : "withdrew");
break; break;
case TLV_TYPE_UNOTIF_CAP: case TLV_TYPE_UNOTIF_CAP:
@ -346,8 +342,7 @@ recv_capability(struct nbr *nbr, char *buf, uint16_t len)
else else
nbr->flags &= ~F_NBR_CAP_UNOTIF; nbr->flags &= ~F_NBR_CAP_UNOTIF;
log_debug("%s: lsr-id %s %s the Unrecognized " log_debug("%s: lsr-id %s %s the Unrecognized Notification capability", __func__,
"Notification capability", __func__,
inet_ntoa(nbr->id), (enable) ? "announced" : inet_ntoa(nbr->id), (enable) ? "announced" :
"withdrew"); "withdrew");
break; break;

View file

@ -528,8 +528,7 @@ if_leave_ipv4_group(struct iface *iface, struct in_addr *addr)
if (setsockopt_ipv4_multicast(global.ipv4.ldp_disc_socket, if (setsockopt_ipv4_multicast(global.ipv4.ldp_disc_socket,
IP_DROP_MEMBERSHIP, if_addr, addr->s_addr, iface->ifindex) < 0) { IP_DROP_MEMBERSHIP, if_addr, addr->s_addr, iface->ifindex) < 0) {
log_warn("%s: error IP_DROP_MEMBERSHIP, interface %s " log_warn("%s: error IP_DROP_MEMBERSHIP, interface %s address %s", __func__, iface->name, inet_ntoa(*addr));
"address %s", __func__, iface->name, inet_ntoa(*addr));
return (-1); return (-1);
} }

View file

@ -325,8 +325,7 @@ lde_dispatch_imsg(struct thread *thread)
break; break;
} }
if (lde_address_add(ln, lde_addr) < 0) { if (lde_address_add(ln, lde_addr) < 0) {
log_debug("%s: cannot add address %s, it " log_debug("%s: cannot add address %s, it already exists", __func__,
"already exists", __func__,
log_addr(lde_addr->af, &lde_addr->addr)); log_addr(lde_addr->af, &lde_addr->addr));
} }
break; break;
@ -343,8 +342,7 @@ lde_dispatch_imsg(struct thread *thread)
break; break;
} }
if (lde_address_del(ln, lde_addr) < 0) { if (lde_address_del(ln, lde_addr) < 0) {
log_debug("%s: cannot delete address %s, it " log_debug("%s: cannot delete address %s, it does not exist", __func__,
"does not exist", __func__,
log_addr(lde_addr->af, &lde_addr->addr)); log_addr(lde_addr->af, &lde_addr->addr));
} }
break; break;
@ -382,8 +380,7 @@ lde_dispatch_imsg(struct thread *thread)
fatalx("lde_dispatch_imsg: wrong imsg len"); fatalx("lde_dispatch_imsg: wrong imsg len");
if (lde_nbr_find(imsg.hdr.peerid)) if (lde_nbr_find(imsg.hdr.peerid))
fatalx("lde_dispatch_imsg: " fatalx("lde_dispatch_imsg: neighbor already exists");
"neighbor already exists");
lde_nbr_new(imsg.hdr.peerid, imsg.data); lde_nbr_new(imsg.hdr.peerid, imsg.data);
break; break;
case IMSG_NEIGHBOR_DOWN: case IMSG_NEIGHBOR_DOWN:
@ -534,13 +531,11 @@ lde_dispatch_parent(struct thread *thread)
break; break;
case IMSG_SOCKET_IPC: case IMSG_SOCKET_IPC:
if (iev_ldpe) { if (iev_ldpe) {
log_warnx("%s: received unexpected imsg fd " log_warnx("%s: received unexpected imsg fd to ldpe", __func__);
"to ldpe", __func__);
break; break;
} }
if ((fd = imsg.fd) == -1) { if ((fd = imsg.fd) == -1) {
log_warnx("%s: expected to receive imsg fd to " log_warnx("%s: expected to receive imsg fd to ldpe but didn't receive any", __func__);
"ldpe but didn't receive any", __func__);
break; break;
} }
@ -975,8 +970,7 @@ lde_send_labelmapping(struct lde_nbr *ln, struct fec_node *fn, int single)
lw = (struct lde_wdraw *)fec_find(&ln->sent_wdraw, &fn->fec); lw = (struct lde_wdraw *)fec_find(&ln->sent_wdraw, &fn->fec);
if (lw) { if (lw) {
if (!fec_find(&ln->sent_map_pending, &fn->fec)) { if (!fec_find(&ln->sent_map_pending, &fn->fec)) {
debug_evt("%s: FEC %s: scheduling to send label " debug_evt("%s: FEC %s: scheduling to send label mapping later (waiting for pending label release)",
"mapping later (waiting for pending label release)",
__func__, log_fec(&fn->fec)); __func__, log_fec(&fn->fec));
lde_map_pending_add(ln, fn); lde_map_pending_add(ln, fn);
} }

View file

@ -292,12 +292,10 @@ ldp_config_write(struct vty *vty)
if (nbrp->flags & F_NBRP_GTSM) { if (nbrp->flags & F_NBRP_GTSM) {
if (nbrp->gtsm_enabled) if (nbrp->gtsm_enabled)
vty_out (vty, " neighbor %s ttl-security hops " vty_out (vty, " neighbor %s ttl-security hops %u\n", inet_ntoa(nbrp->lsr_id),
"%u\n", inet_ntoa(nbrp->lsr_id),
nbrp->gtsm_hops); nbrp->gtsm_hops);
else else
vty_out (vty, " neighbor %s ttl-security " vty_out (vty, " neighbor %s ttl-security disable\n",inet_ntoa(nbrp->lsr_id));
"disable\n",inet_ntoa(nbrp->lsr_id));
} }
if (nbrp->auth.method == AUTH_MD5SIG) if (nbrp->auth.method == AUTH_MD5SIG)
@ -1079,8 +1077,7 @@ ldp_vty_neighbor_password(struct vty *vty, const char *negate, struct in_addr ls
password_len = strlcpy(nbrp->auth.md5key, password_str, password_len = strlcpy(nbrp->auth.md5key, password_str,
sizeof(nbrp->auth.md5key)); sizeof(nbrp->auth.md5key));
if (password_len >= sizeof(nbrp->auth.md5key)) if (password_len >= sizeof(nbrp->auth.md5key))
vty_out(vty, "%% password has been truncated to %zu " vty_out(vty, "%% password has been truncated to %zu characters.", sizeof(nbrp->auth.md5key) - 1);
"characters.", sizeof(nbrp->auth.md5key) - 1);
nbrp->auth.md5key_len = strlen(nbrp->auth.md5key); nbrp->auth.md5key_len = strlen(nbrp->auth.md5key);
nbrp->auth.method = AUTH_MD5SIG; nbrp->auth.method = AUTH_MD5SIG;
} }

View file

@ -584,8 +584,7 @@ show_nbr_detail_msg(struct vty *vty, struct imsg *imsg,
log_addr(nbr->af, &nbr->raddr),ntohs(nbr->rport)); log_addr(nbr->af, &nbr->raddr),ntohs(nbr->rport));
vty_out (vty, " Authentication: %s\n", vty_out (vty, " Authentication: %s\n",
(nbr->auth_method == AUTH_MD5SIG) ? "TCP MD5 Signature" : "none"); (nbr->auth_method == AUTH_MD5SIG) ? "TCP MD5 Signature" : "none");
vty_out(vty, " Session Holdtime: %u secs; " vty_out(vty, " Session Holdtime: %u secs; KeepAlive interval: %u secs\n", nbr->holdtime,
"KeepAlive interval: %u secs\n", nbr->holdtime,
nbr->holdtime / KEEPALIVE_PER_PERIOD); nbr->holdtime / KEEPALIVE_PER_PERIOD);
vty_out(vty, " State: %s; Downstream-Unsolicited\n", vty_out(vty, " State: %s; Downstream-Unsolicited\n",
nbr_state_name(nbr->nbr_state)); nbr_state_name(nbr->nbr_state));
@ -1252,8 +1251,7 @@ show_l2vpn_binding_msg(struct vty *vty, struct imsg *imsg,
if (pw->local_label != NO_LABEL) { if (pw->local_label != NO_LABEL) {
vty_out (vty, " Local Label: %u\n", vty_out (vty, " Local Label: %u\n",
pw->local_label); pw->local_label);
vty_out (vty, "%-8sCbit: %u, VC Type: %s, " vty_out (vty, "%-8sCbit: %u, VC Type: %s, GroupID: %u\n", "", pw->local_cword,
"GroupID: %u\n", "", pw->local_cword,
pw_type_name(pw->type),pw->local_gid); pw_type_name(pw->type),pw->local_gid);
vty_out (vty, "%-8sMTU: %u\n", "",pw->local_ifmtu); vty_out (vty, "%-8sMTU: %u\n", "",pw->local_ifmtu);
vty_out (vty, "%-8sLast failure: %s\n", "", vty_out (vty, "%-8sLast failure: %s\n", "",
@ -1265,8 +1263,7 @@ show_l2vpn_binding_msg(struct vty *vty, struct imsg *imsg,
if (pw->remote_label != NO_LABEL) { if (pw->remote_label != NO_LABEL) {
vty_out (vty, " Remote Label: %u\n", vty_out (vty, " Remote Label: %u\n",
pw->remote_label); pw->remote_label);
vty_out (vty, "%-8sCbit: %u, VC Type: %s, " vty_out (vty, "%-8sCbit: %u, VC Type: %s, GroupID: %u\n", "", pw->remote_cword,
"GroupID: %u\n", "", pw->remote_cword,
pw_type_name(pw->type),pw->remote_gid); pw_type_name(pw->type),pw->remote_gid);
vty_out (vty, "%-8sMTU: %u\n", "",pw->remote_ifmtu); vty_out (vty, "%-8sMTU: %u\n", "",pw->remote_ifmtu);
} else } else

View file

@ -662,23 +662,19 @@ main_dispatch_lde(struct thread *thread)
switch (imsg.hdr.type) { switch (imsg.hdr.type) {
case IMSG_KPW_ADD: case IMSG_KPW_ADD:
if (kmpw_add(imsg.data)) if (kmpw_add(imsg.data))
log_warnx("%s: error adding " log_warnx("%s: error adding pseudowire", __func__);
"pseudowire", __func__);
break; break;
case IMSG_KPW_DELETE: case IMSG_KPW_DELETE:
if (kmpw_del(imsg.data)) if (kmpw_del(imsg.data))
log_warnx("%s: error deleting " log_warnx("%s: error deleting pseudowire", __func__);
"pseudowire", __func__);
break; break;
case IMSG_KPW_SET: case IMSG_KPW_SET:
if (kmpw_set(imsg.data)) if (kmpw_set(imsg.data))
log_warnx("%s: error setting " log_warnx("%s: error setting pseudowire", __func__);
"pseudowire", __func__);
break; break;
case IMSG_KPW_UNSET: case IMSG_KPW_UNSET:
if (kmpw_unset(imsg.data)) if (kmpw_unset(imsg.data))
log_warnx("%s: error unsetting " log_warnx("%s: error unsetting pseudowire", __func__);
"pseudowire", __func__);
break; break;
} }
break; break;
@ -857,8 +853,7 @@ main_imsg_send_net_socket(int af, enum socket_type type)
fd = ldp_create_socket(af, type); fd = ldp_create_socket(af, type);
if (fd == -1) { if (fd == -1) {
log_warnx("%s: failed to create %s socket for address-family " log_warnx("%s: failed to create %s socket for address-family %s", __func__, socket_name(type), af_name(af));
"%s", __func__, socket_name(type), af_name(af));
return; return;
} }

View file

@ -355,13 +355,11 @@ ldpe_dispatch_main(struct thread *thread)
break; break;
case IMSG_SOCKET_IPC: case IMSG_SOCKET_IPC:
if (iev_lde) { if (iev_lde) {
log_warnx("%s: received unexpected imsg fd " log_warnx("%s: received unexpected imsg fd to lde", __func__);
"to lde", __func__);
break; break;
} }
if ((fd = imsg.fd) == -1) { if ((fd = imsg.fd) == -1) {
log_warnx("%s: expected to receive imsg fd to " log_warnx("%s: expected to receive imsg fd to lde but didn't receive any", __func__);
"lde but didn't receive any", __func__);
break; break;
} }
@ -617,8 +615,7 @@ ldpe_dispatch_lde(struct thread *thread)
nbr = nbr_find_peerid(imsg.hdr.peerid); nbr = nbr_find_peerid(imsg.hdr.peerid);
if (nbr == NULL) { if (nbr == NULL) {
log_debug("ldpe_dispatch_lde: cannot find " log_debug("ldpe_dispatch_lde: cannot find neighbor");
"neighbor");
break; break;
} }
if (nbr->state != NBR_STA_OPER) if (nbr->state != NBR_STA_OPER)
@ -645,8 +642,7 @@ ldpe_dispatch_lde(struct thread *thread)
case IMSG_WITHDRAW_ADD_END: case IMSG_WITHDRAW_ADD_END:
nbr = nbr_find_peerid(imsg.hdr.peerid); nbr = nbr_find_peerid(imsg.hdr.peerid);
if (nbr == NULL) { if (nbr == NULL) {
log_debug("ldpe_dispatch_lde: cannot find " log_debug("ldpe_dispatch_lde: cannot find neighbor");
"neighbor");
break; break;
} }
if (nbr->state != NBR_STA_OPER) if (nbr->state != NBR_STA_OPER)
@ -679,8 +675,7 @@ ldpe_dispatch_lde(struct thread *thread)
nbr = nbr_find_peerid(imsg.hdr.peerid); nbr = nbr_find_peerid(imsg.hdr.peerid);
if (nbr == NULL) { if (nbr == NULL) {
log_debug("ldpe_dispatch_lde: cannot find " log_debug("ldpe_dispatch_lde: cannot find neighbor");
"neighbor");
break; break;
} }
if (nbr->state != NBR_STA_OPER) if (nbr->state != NBR_STA_OPER)
@ -700,8 +695,7 @@ ldpe_dispatch_lde(struct thread *thread)
case IMSG_NBR_SHUTDOWN: case IMSG_NBR_SHUTDOWN:
nbr = nbr_find_peerid(imsg.hdr.peerid); nbr = nbr_find_peerid(imsg.hdr.peerid);
if (nbr == NULL) { if (nbr == NULL) {
log_debug("ldpe_dispatch_lde: cannot find " log_debug("ldpe_dispatch_lde: cannot find neighbor");
"neighbor");
break; break;
} }
if (nbr->state != NBR_STA_OPER) if (nbr->state != NBR_STA_OPER)

View file

@ -143,8 +143,7 @@ nbr_fsm(struct nbr *nbr, enum nbr_event event)
if (nbr_fsm_tbl[i].state == -1) { if (nbr_fsm_tbl[i].state == -1) {
/* event outside of the defined fsm, ignore it. */ /* event outside of the defined fsm, ignore it. */
log_warnx("%s: lsr-id %s, event %s not expected in " log_warnx("%s: lsr-id %s, event %s not expected in state %s", __func__, inet_ntoa(nbr->id),
"state %s", __func__, inet_ntoa(nbr->id),
nbr_event_names[event], nbr_state_name(old_state)); nbr_event_names[event], nbr_state_name(old_state));
return (0); return (0);
} }
@ -153,8 +152,7 @@ nbr_fsm(struct nbr *nbr, enum nbr_event event)
nbr->state = new_state; nbr->state = new_state;
if (old_state != nbr->state) { if (old_state != nbr->state) {
log_debug("%s: event %s resulted in action %s and " log_debug("%s: event %s resulted in action %s and changing state for lsr-id %s from %s to %s",
"changing state for lsr-id %s from %s to %s",
__func__, nbr_event_names[event], __func__, nbr_event_names[event],
nbr_action_names[nbr_fsm_tbl[i].action], nbr_action_names[nbr_fsm_tbl[i].action],
inet_ntoa(nbr->id), nbr_state_name(old_state), inet_ntoa(nbr->id), nbr_state_name(old_state),

View file

@ -309,8 +309,7 @@ void
log_msg_notification(int out, struct nbr *nbr, struct notify_msg *nm) log_msg_notification(int out, struct nbr *nbr, struct notify_msg *nm)
{ {
if (nm->status_code & STATUS_FATAL) { if (nm->status_code & STATUS_FATAL) {
debug_msg(out, "notification: lsr-id %s, status %s " debug_msg(out, "notification: lsr-id %s, status %s (fatal error)", inet_ntoa(nbr->id),
"(fatal error)", inet_ntoa(nbr->id),
status_code_name(nm->status_code)); status_code_name(nm->status_code));
return; return;
} }

View file

@ -77,8 +77,7 @@ send_packet(int fd, int af, union ldpd_addr *dst, struct iface_af *ia,
if (ia && IN_MULTICAST(ntohl(dst->v4.s_addr))) { if (ia && IN_MULTICAST(ntohl(dst->v4.s_addr))) {
/* set outgoing interface for multicast traffic */ /* set outgoing interface for multicast traffic */
if (sock_set_ipv4_mcast(ia->iface) == -1) { if (sock_set_ipv4_mcast(ia->iface) == -1) {
log_debug("%s: error setting multicast " log_debug("%s: error setting multicast interface, %s", __func__, ia->iface->name);
"interface, %s", __func__, ia->iface->name);
return (-1); return (-1);
} }
} }
@ -87,8 +86,7 @@ send_packet(int fd, int af, union ldpd_addr *dst, struct iface_af *ia,
if (ia && IN6_IS_ADDR_MULTICAST(&dst->v6)) { if (ia && IN6_IS_ADDR_MULTICAST(&dst->v6)) {
/* set outgoing interface for multicast traffic */ /* set outgoing interface for multicast traffic */
if (sock_set_ipv6_mcast(ia->iface) == -1) { if (sock_set_ipv6_mcast(ia->iface) == -1) {
log_debug("%s: error setting multicast " log_debug("%s: error setting multicast interface, %s", __func__, ia->iface->name);
"interface, %s", __func__, ia->iface->name);
return (-1); return (-1);
} }
} }
@ -368,8 +366,7 @@ session_accept(struct thread *thread)
return (0); return (0);
} }
if (nbr->state != NBR_STA_PRESENT) { if (nbr->state != NBR_STA_PRESENT) {
log_debug("%s: lsr-id %s: rejecting additional transport " log_debug("%s: lsr-id %s: rejecting additional transport connection", __func__, inet_ntoa(nbr->id));
"connection", __func__, inet_ntoa(nbr->id));
close(newfd); close(newfd);
return (0); return (0);
} }

View file

@ -143,8 +143,7 @@ void bfd_peer_sendmsg(struct zclient *zclient, struct bfd_info *bfd_info,
if (!zclient || zclient->sock < 0) { if (!zclient || zclient->sock < 0) {
if (bfd_debug) if (bfd_debug)
zlog_debug( zlog_debug(
"%s: Can't send BFD peer register, Zebra client not " "%s: Can't send BFD peer register, Zebra client not established",
"established",
__func__); __func__);
return; return;
} }
@ -217,8 +216,7 @@ struct interface *bfd_get_peer_info(struct stream *s, struct prefix *dp,
if (ifp == NULL) { if (ifp == NULL) {
if (bfd_debug) if (bfd_debug)
zlog_debug( zlog_debug(
"zebra_interface_bfd_read: " "zebra_interface_bfd_read: Can't find interface by ifindex: %d ",
"Can't find interface by ifindex: %d ",
ifindex); ifindex);
return NULL; return NULL;
} }
@ -320,8 +318,7 @@ void bfd_show_param(struct vty *vty, struct bfd_info *bfd_info, int bfd_tag,
json_bfd); json_bfd);
} else { } else {
vty_out(vty, vty_out(vty,
" %s%sDetect Multiplier: %d, Min Rx interval: %d," " %s%sDetect Multiplier: %d, Min Rx interval: %d, Min Tx interval: %d\n",
" Min Tx interval: %d\n",
(extra_space) ? " " : "", (bfd_tag) ? "BFD: " : " ", (extra_space) ? " " : "", (bfd_tag) ? "BFD: " : " ",
bfd_info->detect_mult, bfd_info->required_min_rx, bfd_info->detect_mult, bfd_info->required_min_rx,
bfd_info->desired_min_tx); bfd_info->desired_min_tx);
@ -397,8 +394,7 @@ void bfd_client_sendmsg(struct zclient *zclient, int command,
if (!zclient || zclient->sock < 0) { if (!zclient || zclient->sock < 0) {
if (bfd_debug) if (bfd_debug)
zlog_debug( zlog_debug(
"%s: Can't send BFD client register, Zebra client not " "%s: Can't send BFD client register, Zebra client not established",
"established",
__func__); __func__);
return; return;
} }

View file

@ -327,8 +327,7 @@ buffer_status_t buffer_flush_window(struct buffer *b, int fd, int width,
/* This should absolutely never occur. */ /* This should absolutely never occur. */
flog_err_sys( flog_err_sys(
EC_LIB_SYSTEM_CALL, EC_LIB_SYSTEM_CALL,
"%s: corruption detected: iov_small overflowed; " "%s: corruption detected: iov_small overflowed; head %p, tail %p, head->next %p",
"head %p, tail %p, head->next %p",
__func__, (void *)b->head, __func__, (void *)b->head,
(void *)b->tail, (void *)b->head->next); (void *)b->tail, (void *)b->head->next);
iov = XMALLOC(MTYPE_TMP, iov = XMALLOC(MTYPE_TMP,

View file

@ -93,8 +93,7 @@ prefix_list_length_validate(const struct lyd_node *dnode)
return NB_OK; return NB_OK;
log_and_fail: log_and_fail:
zlog_info("prefix-list: invalid prefix range for %pFX: " zlog_info("prefix-list: invalid prefix range for %pFX: Make sure that mask length < ge <= le", &p);
"Make sure that mask length < ge <= le", &p);
return NB_ERR_VALIDATION; return NB_ERR_VALIDATION;
} }

View file

@ -785,8 +785,7 @@ static void if_dump(const struct interface *ifp)
struct vrf *vrf = vrf_lookup_by_id(ifp->vrf_id); struct vrf *vrf = vrf_lookup_by_id(ifp->vrf_id);
zlog_info( zlog_info(
"Interface %s vrf %s(%u) index %d metric %d mtu %d " "Interface %s vrf %s(%u) index %d metric %d mtu %d mtu6 %d %s",
"mtu6 %d %s",
ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, ifp->ifindex, ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, ifp->ifindex,
ifp->metric, ifp->mtu, ifp->mtu6, ifp->metric, ifp->mtu, ifp->mtu6,
if_flag_dump(ifp->flags)); if_flag_dump(ifp->flags));

View file

@ -273,8 +273,7 @@ void zlog_backtrace(int priority)
if (size <= 0 || (size_t)size > array_size(array)) { if (size <= 0 || (size_t)size > array_size(array)) {
flog_err_sys( flog_err_sys(
EC_LIB_SYSTEM_CALL, EC_LIB_SYSTEM_CALL,
"Cannot get backtrace, returned invalid # of frames %d " "Cannot get backtrace, returned invalid # of frames %d (valid range is between 1 and %lu)",
"(valid range is between 1 and %lu)",
size, (unsigned long)(array_size(array))); size, (unsigned long)(array_size(array)));
return; return;
} }
@ -301,8 +300,7 @@ void zlog_thread_info(int log_level)
if (tc) if (tc)
zlog(log_level, zlog(log_level,
"Current thread function %s, scheduled from " "Current thread function %s, scheduled from file %s, line %u",
"file %s, line %u",
tc->funcname, tc->schedfrom, tc->schedfrom_line); tc->funcname, tc->schedfrom, tc->schedfrom_line);
else else
zlog(log_level, "Current thread not known/applicable"); zlog(log_level, "Current thread not known/applicable");
@ -465,8 +463,7 @@ static const struct zebra_desc_table *zroute_lookup(unsigned int zroute)
for (i = 0; i < array_size(route_types); i++) { for (i = 0; i < array_size(route_types); i++) {
if (zroute == route_types[i].type) { if (zroute == route_types[i].type) {
zlog_warn( zlog_warn(
"internal error: route type table out of order " "internal error: route type table out of order while searching for %u, please notify developers",
"while searching for %u, please notify developers",
zroute); zroute);
return &route_types[i]; return &route_types[i];
} }

View file

@ -157,8 +157,7 @@ static int qmem_exit_walker(void *arg, struct memgroup *mg, struct memtype *mt)
if (!mt) { if (!mt) {
fprintf(eda->fp, fprintf(eda->fp,
"%s: showing active allocations in " "%s: showing active allocations in memory group %s\n",
"memory group %s\n",
eda->prefix, mg->name); eda->prefix, mg->name);
} else if (mt->n_alloc) { } else if (mt->n_alloc) {

View file

@ -558,8 +558,7 @@ static void zprivs_caps_init(struct zebra_privs_t *zprivs)
/* nonsensical to have gotten here but not have capabilities */ /* nonsensical to have gotten here but not have capabilities */
if (!zprivs_state.syscaps_p) { if (!zprivs_state.syscaps_p) {
fprintf(stderr, fprintf(stderr,
"%s: capabilities enabled, " "%s: capabilities enabled, but no valid capabilities supplied\n",
"but no valid capabilities supplied\n",
__func__); __func__);
} }

View file

@ -353,8 +353,7 @@ int generic_match_add(struct vty *vty, struct route_map_index *index,
"%% [%s] Argument form is unsupported or malformed.\n", "%% [%s] Argument form is unsupported or malformed.\n",
frr_protonameinst); frr_protonameinst);
else else
zlog_warn("Argument form is unsupported or malformed: " zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg);
"%s %s", command, arg);
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
case RMAP_COMPILE_SUCCESS: case RMAP_COMPILE_SUCCESS:
/* /*
@ -405,8 +404,7 @@ int generic_match_delete(struct vty *vty, struct route_map_index *index,
"%% [%s] Argument form is unsupported or malformed.\n", "%% [%s] Argument form is unsupported or malformed.\n",
frr_protonameinst); frr_protonameinst);
else else
zlog_warn("Argument form is unsupported or malformed: " zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg);
"%s %s", command, arg);
retval = CMD_WARNING_CONFIG_FAILED; retval = CMD_WARNING_CONFIG_FAILED;
break; break;
case RMAP_COMPILE_SUCCESS: case RMAP_COMPILE_SUCCESS:
@ -441,8 +439,7 @@ int generic_set_add(struct vty *vty, struct route_map_index *index,
"%% [%s] Argument form is unsupported or malformed.\n", "%% [%s] Argument form is unsupported or malformed.\n",
frr_protonameinst); frr_protonameinst);
else else
zlog_warn("Argument form is unsupported or malformed: " zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg);
"%s %s", command, arg);
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
case RMAP_COMPILE_SUCCESS: case RMAP_COMPILE_SUCCESS:
break; break;
@ -470,8 +467,7 @@ int generic_set_delete(struct vty *vty, struct route_map_index *index,
"%% [%s] Argument form is unsupported or malformed.\n", "%% [%s] Argument form is unsupported or malformed.\n",
frr_protonameinst); frr_protonameinst);
else else
zlog_warn("Argument form is unsupported or malformed: " zlog_warn("Argument form is unsupported or malformed: %s %s", command, arg);
"%s %s", command, arg);
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
case RMAP_COMPILE_SUCCESS: case RMAP_COMPILE_SUCCESS:
break; break;

View file

@ -264,8 +264,7 @@ int setsockopt_ipv4_multicast(int sock, int optname, struct in_addr if_addr,
* up */ * up */
char buf[1][INET_ADDRSTRLEN]; char buf[1][INET_ADDRSTRLEN];
zlog_info( zlog_info(
"setsockopt_ipv4_multicast attempting to drop and " "setsockopt_ipv4_multicast attempting to drop and re-add (fd %d, mcast %s, ifindex %u)",
"re-add (fd %d, mcast %s, ifindex %u)",
sock, inet_ntop(AF_INET, &mreqn.imr_multiaddr, buf[0], sock, inet_ntop(AF_INET, &mreqn.imr_multiaddr, buf[0],
sizeof(buf[0])), sizeof(buf[0])),
ifindex); ifindex);
@ -306,8 +305,7 @@ int setsockopt_ipv4_multicast(int sock, int optname, struct in_addr if_addr,
* up */ * up */
char buf[1][INET_ADDRSTRLEN]; char buf[1][INET_ADDRSTRLEN];
zlog_info( zlog_info(
"setsockopt_ipv4_multicast attempting to drop and " "setsockopt_ipv4_multicast attempting to drop and re-add (fd %d, mcast %s, ifindex %u)",
"re-add (fd %d, mcast %s, ifindex %u)",
sock, inet_ntop(AF_INET, &mreq.imr_multiaddr, buf[0], sock, inet_ntop(AF_INET, &mreq.imr_multiaddr, buf[0],
sizeof(buf[0])), sizeof(buf[0])),
ifindex); ifindex);

View file

@ -406,8 +406,7 @@ int sockopt_v6only(int family, int sock)
sizeof(int)); sizeof(int));
if (ret < 0) { if (ret < 0) {
flog_err(EC_LIB_SOCKET, flog_err(EC_LIB_SOCKET,
"can't set sockopt IPV6_V6ONLY " "can't set sockopt IPV6_V6ONLY to socket %d",
"to socket %d",
sock); sock);
return -1; return -1;
} }

View file

@ -305,8 +305,7 @@ DEFUN (show_thread_cpu,
filter = parse_filter(argv[idx]->arg); filter = parse_filter(argv[idx]->arg);
if (!filter) { if (!filter) {
vty_out(vty, vty_out(vty,
"Invalid filter \"%s\" specified; must contain at least" "Invalid filter \"%s\" specified; must contain at leastone of 'RWTEXB'\n",
"one of 'RWTEXB'\n",
argv[idx]->arg); argv[idx]->arg);
return CMD_WARNING; return CMD_WARNING;
} }
@ -393,8 +392,7 @@ DEFUN (clear_thread_cpu,
filter = parse_filter(argv[idx]->arg); filter = parse_filter(argv[idx]->arg);
if (!filter) { if (!filter) {
vty_out(vty, vty_out(vty,
"Invalid filter \"%s\" specified; must contain at least" "Invalid filter \"%s\" specified; must contain at leastone of 'RWTEXB'\n",
"one of 'RWTEXB'\n",
argv[idx]->arg); argv[idx]->arg);
return CMD_WARNING; return CMD_WARNING;
} }

View file

@ -691,8 +691,7 @@ int vrf_netns_handler_create(struct vty *vty, struct vrf *vrf, char *pathname,
return CMD_SUCCESS; return CMD_SUCCESS;
if (vty) if (vty)
vty_out(vty, vty_out(vty,
"NS %s is already configured" "NS %s is already configured with VRF %u(%s)\n",
" with VRF %u(%s)\n",
ns->name, vrf2->vrf_id, vrf2->name); ns->name, vrf2->vrf_id, vrf2->name);
else else
zlog_info("NS %s is already configured with VRF %u(%s)", zlog_info("NS %s is already configured with VRF %u(%s)",

View file

@ -1244,8 +1244,7 @@ static int vty_telnet_option(struct vty *vty, unsigned char *buf, int nbytes)
if (vty->sb_len != TELNET_NAWS_SB_LEN) if (vty->sb_len != TELNET_NAWS_SB_LEN)
flog_err( flog_err(
EC_LIB_SYSTEM_CALL, EC_LIB_SYSTEM_CALL,
"RFC 1073 violation detected: telnet NAWS option " "RFC 1073 violation detected: telnet NAWS option should send %d characters, but we received %lu",
"should send %d characters, but we received %lu",
TELNET_NAWS_SB_LEN, TELNET_NAWS_SB_LEN,
(unsigned long)vty->sb_len); (unsigned long)vty->sb_len);
else if (sizeof(vty->sb_buf) < TELNET_NAWS_SB_LEN) else if (sizeof(vty->sb_buf) < TELNET_NAWS_SB_LEN)
@ -1261,8 +1260,7 @@ static int vty_telnet_option(struct vty *vty, unsigned char *buf, int nbytes)
| vty->sb_buf[4]); | vty->sb_buf[4]);
#ifdef TELNET_OPTION_DEBUG #ifdef TELNET_OPTION_DEBUG
vty_out(vty, vty_out(vty,
"TELNET NAWS window size negotiation completed: " "TELNET NAWS window size negotiation completed: width %d, height %d\n",
"width %d, height %d\n",
vty->width, vty->height); vty->width, vty->height);
#endif #endif
} }

View file

@ -1924,8 +1924,7 @@ static int link_params_set_value(struct stream *s, struct if_link_params *iflp)
if (i < bwclassnum) if (i < bwclassnum)
flog_err( flog_err(
EC_LIB_ZAPI_MISSMATCH, EC_LIB_ZAPI_MISSMATCH,
"%s: received %d > %d (MAX_CLASS_TYPE) bw entries" "%s: received %d > %d (MAX_CLASS_TYPE) bw entries - outdated library?",
" - outdated library?",
__func__, bwclassnum, MAX_CLASS_TYPE); __func__, bwclassnum, MAX_CLASS_TYPE);
} }
STREAM_GETL(s, iflp->admin_grp); STREAM_GETL(s, iflp->admin_grp);

View file

@ -170,8 +170,7 @@ void nhrp_route_announce(int add, enum nhrp_cache_type type,
prefix2str(&api.prefix, buf[0], sizeof(buf[0])); prefix2str(&api.prefix, buf[0], sizeof(buf[0]));
zlog_debug( zlog_debug(
"Zebra send: route %s %s nexthop %s metric %u" "Zebra send: route %s %s nexthop %s metric %u count %d dev %s",
" count %d dev %s",
add ? "add" : "del", buf[0], add ? "add" : "del", buf[0],
nexthop ? inet_ntop(api.prefix.family, &api_nh->gate, nexthop ? inet_ntop(api.prefix.family, &api_nh->gate,
buf[1], sizeof(buf[1])) buf[1], sizeof(buf[1]))

View file

@ -1966,8 +1966,7 @@ static int ospf6_ifp_up(struct interface *ifp)
{ {
if (IS_OSPF6_DEBUG_ZEBRA(RECV)) if (IS_OSPF6_DEBUG_ZEBRA(RECV))
zlog_debug( zlog_debug(
"Zebra Interface state change: " "Zebra Interface state change: %s index %d flags %llx metric %d mtu %d bandwidth %d",
"%s index %d flags %llx metric %d mtu %d bandwidth %d",
ifp->name, ifp->ifindex, (unsigned long long)ifp->flags, ifp->name, ifp->ifindex, (unsigned long long)ifp->flags,
ifp->metric, ifp->mtu6, ifp->bandwidth); ifp->metric, ifp->mtu6, ifp->bandwidth);
@ -1980,8 +1979,7 @@ static int ospf6_ifp_down(struct interface *ifp)
{ {
if (IS_OSPF6_DEBUG_ZEBRA(RECV)) if (IS_OSPF6_DEBUG_ZEBRA(RECV))
zlog_debug( zlog_debug(
"Zebra Interface state change: " "Zebra Interface state change: %s index %d flags %llx metric %d mtu %d bandwidth %d",
"%s index %d flags %llx metric %d mtu %d bandwidth %d",
ifp->name, ifp->ifindex, (unsigned long long)ifp->flags, ifp->name, ifp->ifindex, (unsigned long long)ifp->flags,
ifp->metric, ifp->mtu6, ifp->bandwidth); ifp->metric, ifp->mtu6, ifp->bandwidth);

View file

@ -658,8 +658,7 @@ static int ospf6_spf_calculation_thread(struct thread *t)
(long long)runtime.tv_usec); (long long)runtime.tv_usec);
zlog_info( zlog_info(
"SPF processing: # Areas: %d, SPF runtime: %lld sec %lld usec, " "SPF processing: # Areas: %d, SPF runtime: %lld sec %lld usec, Reason: %s\n",
"Reason: %s\n",
areas_processed, (long long)runtime.tv_sec, areas_processed, (long long)runtime.tv_sec,
(long long)runtime.tv_usec, rbuf); (long long)runtime.tv_usec, rbuf);

View file

@ -390,8 +390,7 @@ DEFUN(ospf6_router_id,
for (ALL_LIST_ELEMENTS_RO(o->area_list, node, oa)) { for (ALL_LIST_ELEMENTS_RO(o->area_list, node, oa)) {
if (oa->full_nbrs) { if (oa->full_nbrs) {
vty_out(vty, vty_out(vty,
"For this router-id change to take effect," "For this router-id change to take effect, save config and restart ospf6d\n");
" save config and restart ospf6d\n");
return CMD_SUCCESS; return CMD_SUCCESS;
} }
} }
@ -417,8 +416,7 @@ DEFUN(no_ospf6_router_id,
for (ALL_LIST_ELEMENTS_RO(o->area_list, node, oa)) { for (ALL_LIST_ELEMENTS_RO(o->area_list, node, oa)) {
if (oa->full_nbrs) { if (oa->full_nbrs) {
vty_out(vty, vty_out(vty,
"For this router-id change to take effect," "For this router-id change to take effect, save config and restart ospf6d\n");
" save config and restart ospf6d\n");
return CMD_SUCCESS; return CMD_SUCCESS;
} }
} }

View file

@ -348,8 +348,7 @@ static int ospf_abr_nssa_am_elected(struct ospf_area *area)
if (IS_ROUTER_LSA_NT(rlsa)) { if (IS_ROUTER_LSA_NT(rlsa)) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_abr_nssa_am_elected: " "ospf_abr_nssa_am_elected: router %s asserts Nt",
"router %s asserts Nt",
inet_ntoa(lsa->data->id)); inet_ntoa(lsa->data->id));
return 0; return 0;
} }
@ -391,15 +390,13 @@ static void ospf_abr_nssa_check_status(struct ospf *ospf)
if (IS_DEBUG_OSPF(nssa, NSSA)) if (IS_DEBUG_OSPF(nssa, NSSA))
zlog_debug( zlog_debug(
"ospf_abr_nssa_check_status: " "ospf_abr_nssa_check_status: checking area %s",
"checking area %s",
inet_ntoa(area->area_id)); inet_ntoa(area->area_id));
if (!IS_OSPF_ABR(area->ospf)) { if (!IS_OSPF_ABR(area->ospf)) {
if (IS_DEBUG_OSPF(nssa, NSSA)) if (IS_DEBUG_OSPF(nssa, NSSA))
zlog_debug( zlog_debug(
"ospf_abr_nssa_check_status: " "ospf_abr_nssa_check_status: not ABR");
"not ABR");
area->NSSATranslatorState = area->NSSATranslatorState =
OSPF_NSSA_TRANSLATE_DISABLED; OSPF_NSSA_TRANSLATE_DISABLED;
} else { } else {
@ -409,8 +406,7 @@ static void ospf_abr_nssa_check_status(struct ospf *ospf)
/* TODO: check previous state and flush? */ /* TODO: check previous state and flush? */
if (IS_DEBUG_OSPF(nssa, NSSA)) if (IS_DEBUG_OSPF(nssa, NSSA))
zlog_debug( zlog_debug(
"ospf_abr_nssa_check_status: " "ospf_abr_nssa_check_status: never translate");
"never translate");
area->NSSATranslatorState = area->NSSATranslatorState =
OSPF_NSSA_TRANSLATE_DISABLED; OSPF_NSSA_TRANSLATE_DISABLED;
break; break;
@ -422,8 +418,7 @@ static void ospf_abr_nssa_check_status(struct ospf *ospf)
*/ */
if (IS_DEBUG_OSPF(nssa, NSSA)) if (IS_DEBUG_OSPF(nssa, NSSA))
zlog_debug( zlog_debug(
"ospf_abr_nssa_check_status: " "ospf_abr_nssa_check_status: translate always");
"translate always");
area->NSSATranslatorState = area->NSSATranslatorState =
OSPF_NSSA_TRANSLATE_ENABLED; OSPF_NSSA_TRANSLATE_ENABLED;
break; break;
@ -435,15 +430,13 @@ static void ospf_abr_nssa_check_status(struct ospf *ospf)
OSPF_NSSA_TRANSLATE_ENABLED; OSPF_NSSA_TRANSLATE_ENABLED;
if (IS_DEBUG_OSPF(nssa, NSSA)) if (IS_DEBUG_OSPF(nssa, NSSA))
zlog_debug( zlog_debug(
"ospf_abr_nssa_check_status: " "ospf_abr_nssa_check_status: elected translator");
"elected translator");
} else { } else {
area->NSSATranslatorState = area->NSSATranslatorState =
OSPF_NSSA_TRANSLATE_DISABLED; OSPF_NSSA_TRANSLATE_DISABLED;
if (IS_DEBUG_OSPF(nssa, NSSA)) if (IS_DEBUG_OSPF(nssa, NSSA))
zlog_debug( zlog_debug(
"ospf_abr_nssa_check_status: " "ospf_abr_nssa_check_status: not elected");
"not elected");
} }
break; break;
} }
@ -639,8 +632,7 @@ static int ospf_abr_translate_nssa(struct ospf_area *area, struct ospf_lsa *lsa)
if (ext7->e[0].fwd_addr.s_addr == OSPF_DEFAULT_DESTINATION) { if (ext7->e[0].fwd_addr.s_addr == OSPF_DEFAULT_DESTINATION) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_abr_translate_nssa(): LSA Id %s, " "ospf_abr_translate_nssa(): LSA Id %s, Forward address is 0, NO Translation",
"Forward address is 0, NO Translation",
inet_ntoa(lsa->data->id)); inet_ntoa(lsa->data->id));
return 1; return 1;
} }
@ -652,8 +644,7 @@ static int ospf_abr_translate_nssa(struct ospf_area *area, struct ospf_lsa *lsa)
if (old) { if (old) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_abr_translate_nssa(): " "ospf_abr_translate_nssa(): found old translated LSA Id %s, refreshing",
"found old translated LSA Id %s, refreshing",
inet_ntoa(old->data->id)); inet_ntoa(old->data->id));
/* refresh */ /* refresh */
@ -661,8 +652,7 @@ static int ospf_abr_translate_nssa(struct ospf_area *area, struct ospf_lsa *lsa)
if (!new) { if (!new) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_abr_translate_nssa(): " "ospf_abr_translate_nssa(): could not refresh translated LSA Id %s",
"could not refresh translated LSA Id %s",
inet_ntoa(old->data->id)); inet_ntoa(old->data->id));
} }
} else { } else {
@ -673,8 +663,7 @@ static int ospf_abr_translate_nssa(struct ospf_area *area, struct ospf_lsa *lsa)
if (ospf_translated_nssa_originate(area->ospf, lsa) == NULL) { if (ospf_translated_nssa_originate(area->ospf, lsa) == NULL) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_abr_translate_nssa(): Could not translate " "ospf_abr_translate_nssa(): Could not translate Type-7 for %s to Type-5",
"Type-7 for %s to Type-5",
inet_ntoa(lsa->data->id)); inet_ntoa(lsa->data->id));
return 1; return 1;
} }
@ -719,8 +708,7 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost,
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network_to_area(): " "ospf_abr_announce_network_to_area(): old metric: %d, new metric: %d",
"old metric: %d, new metric: %d",
GET_METRIC(sl->metric), cost); GET_METRIC(sl->metric), cost);
if ((GET_METRIC(sl->metric) == full_cost) if ((GET_METRIC(sl->metric) == full_cost)
@ -728,15 +716,13 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost,
/* unchanged. simply reapprove it */ /* unchanged. simply reapprove it */
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network_to_area(): " "ospf_abr_announce_network_to_area(): old summary approved");
"old summary approved");
SET_FLAG(old->flags, OSPF_LSA_APPROVED); SET_FLAG(old->flags, OSPF_LSA_APPROVED);
} else { } else {
/* LSA is changed, refresh it */ /* LSA is changed, refresh it */
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network_to_area(): " "ospf_abr_announce_network_to_area(): refreshing summary");
"refreshing summary");
set_metric(old, full_cost); set_metric(old, full_cost);
lsa = ospf_lsa_refresh(area->ospf, old); lsa = ospf_lsa_refresh(area->ospf, old);
@ -758,8 +744,7 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost,
} else { } else {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network_to_area(): " "ospf_abr_announce_network_to_area(): creating new summary");
"creating new summary");
lsa = ospf_summary_lsa_originate(p, full_cost, area); lsa = ospf_summary_lsa_originate(p, full_cost, area);
/* This will flood through area. */ /* This will flood through area. */
@ -776,8 +761,7 @@ void ospf_abr_announce_network_to_area(struct prefix_ipv4 *p, uint32_t cost,
SET_FLAG(lsa->flags, OSPF_LSA_APPROVED); SET_FLAG(lsa->flags, OSPF_LSA_APPROVED);
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network_to_area(): " "ospf_abr_announce_network_to_area(): flooding new version of summary");
"flooding new version of summary");
} }
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
@ -875,8 +859,7 @@ static void ospf_abr_announce_network(struct ospf *ospf, struct prefix_ipv4 *p,
if (!ospf_abr_should_accept(p, area)) { if (!ospf_abr_should_accept(p, area)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network(): " "ospf_abr_announce_network(): prefix %s/%d was denied by import-list",
"prefix %s/%d was denied by import-list",
inet_ntoa(p->prefix), p->prefixlen); inet_ntoa(p->prefix), p->prefixlen);
continue; continue;
} }
@ -884,8 +867,7 @@ static void ospf_abr_announce_network(struct ospf *ospf, struct prefix_ipv4 *p,
if (!ospf_abr_plist_in_check(area, or, p)) { if (!ospf_abr_plist_in_check(area, or, p)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network(): " "ospf_abr_announce_network(): prefix %s/%d was denied by prefix-list",
"prefix %s/%d was denied by prefix-list",
inet_ntoa(p->prefix), p->prefixlen); inet_ntoa(p->prefix), p->prefixlen);
continue; continue;
} }
@ -894,8 +876,7 @@ static void ospf_abr_announce_network(struct ospf *ospf, struct prefix_ipv4 *p,
&& area->no_summary) { && area->no_summary) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network(): " "ospf_abr_announce_network(): area %s is stub and no_summary",
"area %s is stub and no_summary",
inet_ntoa(area->area_id)); inet_ntoa(area->area_id));
continue; continue;
} }
@ -903,8 +884,7 @@ static void ospf_abr_announce_network(struct ospf *ospf, struct prefix_ipv4 *p,
if (or->path_type == OSPF_PATH_INTER_AREA) { if (or->path_type == OSPF_PATH_INTER_AREA) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network(): this is " "ospf_abr_announce_network(): this is inter-area route to %s/%d",
"inter-area route to %s/%d",
inet_ntoa(p->prefix), p->prefixlen); inet_ntoa(p->prefix), p->prefixlen);
if (!OSPF_IS_AREA_BACKBONE(area)) if (!OSPF_IS_AREA_BACKBONE(area))
@ -915,8 +895,7 @@ static void ospf_abr_announce_network(struct ospf *ospf, struct prefix_ipv4 *p,
if (or->path_type == OSPF_PATH_INTRA_AREA) { if (or->path_type == OSPF_PATH_INTRA_AREA) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network(): " "ospf_abr_announce_network(): this is intra-area route to %s/%d",
"this is intra-area route to %s/%d",
inet_ntoa(p->prefix), p->prefixlen); inet_ntoa(p->prefix), p->prefixlen);
if ((range = ospf_area_range_match(or_area, p)) if ((range = ospf_area_range_match(or_area, p))
&& !ospf_area_is_transit(area)) && !ospf_area_is_transit(area))
@ -976,8 +955,7 @@ static void ospf_abr_process_nssa_translates(struct ospf *ospf)
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_abr_process_nssa_translates(): " "ospf_abr_process_nssa_translates(): looking at area %s",
"looking at area %s",
inet_ntoa(area->area_id)); inet_ntoa(area->area_id));
LSDB_LOOP (NSSA_LSDB(area), rn, lsa) LSDB_LOOP (NSSA_LSDB(area), rn, lsa)
@ -1018,24 +996,21 @@ static void ospf_abr_process_network_rt(struct ospf *ospf,
if (or->path_type >= OSPF_PATH_TYPE1_EXTERNAL) { if (or->path_type >= OSPF_PATH_TYPE1_EXTERNAL) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_process_network_rt(): " "ospf_abr_process_network_rt(): this is an External router, skipping");
"this is an External router, skipping");
continue; continue;
} }
if (or->cost >= OSPF_LS_INFINITY) { if (or->cost >= OSPF_LS_INFINITY) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_process_network_rt():" "ospf_abr_process_network_rt(): this route's cost is infinity, skipping");
" this route's cost is infinity, skipping");
continue; continue;
} }
if (or->type == OSPF_DESTINATION_DISCARD) { if (or->type == OSPF_DESTINATION_DISCARD) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_process_network_rt():" "ospf_abr_process_network_rt(): this is a discard entry, skipping");
" this is a discard entry, skipping");
continue; continue;
} }
@ -1065,8 +1040,7 @@ static void ospf_abr_process_network_rt(struct ospf *ospf,
&& !OSPF_IS_AREA_ID_BACKBONE(or->u.std.area_id)) { && !OSPF_IS_AREA_ID_BACKBONE(or->u.std.area_id)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_process_network_rt():" "ospf_abr_process_network_rt(): this is route is not backbone one, skipping");
" this is route is not backbone one, skipping");
continue; continue;
} }
@ -1078,8 +1052,7 @@ static void ospf_abr_process_network_rt(struct ospf *ospf,
or->path_type != OSPF_PATH_INTRA_AREA) { or->path_type != OSPF_PATH_INTRA_AREA) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_process_network_rt(): ALT ABR: " "ospf_abr_process_network_rt(): ALT ABR: No BB connection, skip not intra-area routes");
"No BB connection, skip not intra-area routes");
continue; continue;
} }
@ -1112,8 +1085,7 @@ static void ospf_abr_announce_rtr_to_area(struct prefix_ipv4 *p, uint32_t cost,
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_network_to_area(): " "ospf_abr_announce_network_to_area(): old metric: %d, new metric: %d",
"old metric: %d, new metric: %d",
GET_METRIC(slsa->metric), cost); GET_METRIC(slsa->metric), cost);
} }
@ -1144,8 +1116,7 @@ static void ospf_abr_announce_rtr_to_area(struct prefix_ipv4 *p, uint32_t cost,
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_rtr_to_area(): " "ospf_abr_announce_rtr_to_area(): flooding new version of summary");
"flooding new version of summary");
/* /*
zlog_info ("ospf_abr_announce_rtr_to_area(): creating new zlog_info ("ospf_abr_announce_rtr_to_area(): creating new
@ -1185,8 +1156,7 @@ static void ospf_abr_announce_rtr(struct ospf *ospf, struct prefix_ipv4 *p,
if (area->external_routing != OSPF_AREA_DEFAULT) { if (area->external_routing != OSPF_AREA_DEFAULT) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_rtr(): " "ospf_abr_announce_rtr(): area %s doesn't support external routing",
"area %s doesn't support external routing",
inet_ntoa(area->area_id)); inet_ntoa(area->area_id));
continue; continue;
} }
@ -1194,8 +1164,7 @@ static void ospf_abr_announce_rtr(struct ospf *ospf, struct prefix_ipv4 *p,
if (or->path_type == OSPF_PATH_INTER_AREA) { if (or->path_type == OSPF_PATH_INTER_AREA) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_rtr(): " "ospf_abr_announce_rtr(): this is inter-area route to %s",
"this is inter-area route to %s",
inet_ntoa(p->prefix)); inet_ntoa(p->prefix));
if (!OSPF_IS_AREA_BACKBONE(area)) if (!OSPF_IS_AREA_BACKBONE(area))
ospf_abr_announce_rtr_to_area(p, or->cost, ospf_abr_announce_rtr_to_area(p, or->cost,
@ -1205,8 +1174,7 @@ static void ospf_abr_announce_rtr(struct ospf *ospf, struct prefix_ipv4 *p,
if (or->path_type == OSPF_PATH_INTRA_AREA) { if (or->path_type == OSPF_PATH_INTRA_AREA) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_rtr(): " "ospf_abr_announce_rtr(): this is intra-area route to %s",
"this is intra-area route to %s",
inet_ntoa(p->prefix)); inet_ntoa(p->prefix));
ospf_abr_announce_rtr_to_area(p, or->cost, area); ospf_abr_announce_rtr_to_area(p, or->cost, area);
} }
@ -1255,8 +1223,7 @@ static void ospf_abr_process_router_rt(struct ospf *ospf,
if (!CHECK_FLAG(or->u.std.flags, ROUTER_LSA_EXTERNAL)) { if (!CHECK_FLAG(or->u.std.flags, ROUTER_LSA_EXTERNAL)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_process_router_rt(): " "ospf_abr_process_router_rt(): This is not an ASBR, skipping");
"This is not an ASBR, skipping");
continue; continue;
} }
@ -1272,8 +1239,7 @@ static void ospf_abr_process_router_rt(struct ospf *ospf,
if (or != best) { if (or != best) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_process_router_rt(): " "ospf_abr_process_router_rt(): This route is not the best among possible, skipping");
"This route is not the best among possible, skipping");
continue; continue;
} }
@ -1283,16 +1249,14 @@ static void ospf_abr_process_router_rt(struct ospf *ospf,
or->u.std.area_id)) { or->u.std.area_id)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_process_router_rt(): " "ospf_abr_process_router_rt(): This route is not a backbone one, skipping");
"This route is not a backbone one, skipping");
continue; continue;
} }
if (or->cost >= OSPF_LS_INFINITY) { if (or->cost >= OSPF_LS_INFINITY) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_process_router_rt(): " "ospf_abr_process_router_rt(): This route has LS_INFINITY metric, skipping");
"This route has LS_INFINITY metric, skipping");
continue; continue;
} }
@ -1302,8 +1266,7 @@ static void ospf_abr_process_router_rt(struct ospf *ospf,
or->path_type != OSPF_PATH_INTRA_AREA) { or->path_type != OSPF_PATH_INTRA_AREA) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_process_network_rt(): ALT ABR: " "ospf_abr_process_network_rt(): ALT ABR: No BB connection, skip not intra-area routes");
"No BB connection, skip not intra-area routes");
continue; continue;
} }
@ -1333,8 +1296,7 @@ ospf_abr_unapprove_translates(struct ospf *ospf) /* For NSSA Translations */
UNSET_FLAG(lsa->flags, OSPF_LSA_APPROVED); UNSET_FLAG(lsa->flags, OSPF_LSA_APPROVED);
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_abr_unapprove_translates(): " "ospf_abr_unapprove_translates(): approved unset on link id %s",
"approved unset on link id %s",
inet_ntoa(lsa->data->id)); inet_ntoa(lsa->data->id));
} }
@ -1355,15 +1317,13 @@ static void ospf_abr_unapprove_summaries(struct ospf *ospf)
for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) { for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_unapprove_summaries(): " "ospf_abr_unapprove_summaries(): considering area %s",
"considering area %s",
inet_ntoa(area->area_id)); inet_ntoa(area->area_id));
LSDB_LOOP (SUMMARY_LSDB(area), rn, lsa) LSDB_LOOP (SUMMARY_LSDB(area), rn, lsa)
if (ospf_lsa_is_self_originated(ospf, lsa)) { if (ospf_lsa_is_self_originated(ospf, lsa)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_unapprove_summaries(): " "ospf_abr_unapprove_summaries(): approved unset on summary link id %s",
"approved unset on summary link id %s",
inet_ntoa(lsa->data->id)); inet_ntoa(lsa->data->id));
UNSET_FLAG(lsa->flags, OSPF_LSA_APPROVED); UNSET_FLAG(lsa->flags, OSPF_LSA_APPROVED);
} }
@ -1372,8 +1332,7 @@ static void ospf_abr_unapprove_summaries(struct ospf *ospf)
if (ospf_lsa_is_self_originated(ospf, lsa)) { if (ospf_lsa_is_self_originated(ospf, lsa)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_unapprove_summaries(): " "ospf_abr_unapprove_summaries(): approved unset on asbr-summary link id %s",
"approved unset on asbr-summary link id %s",
inet_ntoa(lsa->data->id)); inet_ntoa(lsa->data->id));
UNSET_FLAG(lsa->flags, OSPF_LSA_APPROVED); UNSET_FLAG(lsa->flags, OSPF_LSA_APPROVED);
} }
@ -1428,8 +1387,7 @@ static void ospf_abr_announce_aggregates(struct ospf *ospf)
OSPF_AREA_RANGE_ADVERTISE)) { OSPF_AREA_RANGE_ADVERTISE)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_aggregates():" "ospf_abr_announce_aggregates(): discarding suppress-ranges");
" discarding suppress-ranges");
continue; continue;
} }
@ -1439,8 +1397,7 @@ static void ospf_abr_announce_aggregates(struct ospf *ospf)
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_aggregates():" "ospf_abr_announce_aggregates(): this is range: %s/%d",
" this is range: %s/%d",
inet_ntoa(p.u.prefix4), inet_ntoa(p.u.prefix4),
p.prefixlen); p.prefixlen);
@ -1477,9 +1434,7 @@ static void ospf_abr_announce_aggregates(struct ospf *ospf)
area)) { area)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_aggregates(): Skipping " "ospf_abr_announce_aggregates(): Skipping announcement of BB aggregate into a transit area");
"announcement of BB aggregate into"
" a transit area");
continue; continue;
} }
ospf_abr_announce_network_to_area( ospf_abr_announce_network_to_area(
@ -1526,8 +1481,7 @@ ospf_abr_send_nssa_aggregates(struct ospf *ospf) /* temporarily turned off */
OSPF_AREA_RANGE_ADVERTISE)) { OSPF_AREA_RANGE_ADVERTISE)) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_abr_send_nssa_aggregates():" "ospf_abr_send_nssa_aggregates(): discarding suppress-ranges");
" discarding suppress-ranges");
continue; continue;
} }
@ -1537,8 +1491,7 @@ ospf_abr_send_nssa_aggregates(struct ospf *ospf) /* temporarily turned off */
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_abr_send_nssa_aggregates():" "ospf_abr_send_nssa_aggregates(): this is range: %s/%d",
" this is range: %s/%d",
inet_ntoa(p.prefix), p.prefixlen); inet_ntoa(p.prefix), p.prefixlen);
if (CHECK_FLAG(range->flags, if (CHECK_FLAG(range->flags,
@ -1598,8 +1551,7 @@ static void ospf_abr_announce_stub_defaults(struct ospf *ospf)
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_stub_defaults(): " "ospf_abr_announce_stub_defaults(): announcing 0.0.0.0/0 to area %s",
"announcing 0.0.0.0/0 to area %s",
inet_ntoa(area->area_id)); inet_ntoa(area->area_id));
ospf_abr_announce_network_to_area(&p, area->default_cost, area); ospf_abr_announce_network_to_area(&p, area->default_cost, area);
} }
@ -1614,8 +1566,7 @@ static int ospf_abr_remove_unapproved_translates_apply(struct ospf *ospf,
if (CHECK_FLAG(lsa->flags, OSPF_LSA_LOCAL_XLT) if (CHECK_FLAG(lsa->flags, OSPF_LSA_LOCAL_XLT)
&& !CHECK_FLAG(lsa->flags, OSPF_LSA_APPROVED)) { && !CHECK_FLAG(lsa->flags, OSPF_LSA_APPROVED)) {
zlog_info( zlog_info(
"ospf_abr_remove_unapproved_translates(): " "ospf_abr_remove_unapproved_translates(): removing unapproved translates, ID: %s",
"removing unapproved translates, ID: %s",
inet_ntoa(lsa->data->id)); inet_ntoa(lsa->data->id));
/* FLUSH THROUGHOUT AS */ /* FLUSH THROUGHOUT AS */
@ -1656,8 +1607,7 @@ static void ospf_abr_remove_unapproved_summaries(struct ospf *ospf)
for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) { for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_remove_unapproved_summaries(): " "ospf_abr_remove_unapproved_summaries(): looking at area %s",
"looking at area %s",
inet_ntoa(area->area_id)); inet_ntoa(area->area_id));
LSDB_LOOP (SUMMARY_LSDB(area), rn, lsa) LSDB_LOOP (SUMMARY_LSDB(area), rn, lsa)

View file

@ -889,8 +889,7 @@ int ospf_apiserver_register_opaque_type(struct ospf_apiserver *apiserv,
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"API: Add LSA-type(%d)/Opaque-type(%d) into" "API: Add LSA-type(%d)/Opaque-type(%d) into apiserv(%p), total#(%d)",
" apiserv(%p), total#(%d)",
lsa_type, opaque_type, (void *)apiserv, lsa_type, opaque_type, (void *)apiserv,
listcount(apiserv->opaque_types)); listcount(apiserv->opaque_types));
@ -920,8 +919,7 @@ int ospf_apiserver_unregister_opaque_type(struct ospf_apiserver *apiserv,
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"API: Del LSA-type(%d)/Opaque-type(%d)" "API: Del LSA-type(%d)/Opaque-type(%d) from apiserv(%p), total#(%d)",
" from apiserv(%p), total#(%d)",
lsa_type, opaque_type, (void *)apiserv, lsa_type, opaque_type, (void *)apiserv,
listcount(apiserv->opaque_types)); listcount(apiserv->opaque_types));

View file

@ -194,20 +194,17 @@ ospf_ase_calculate_asbr_route (struct ospf *ospf,
if (al->e[0].fwd_addr.s_addr != 0) if (al->e[0].fwd_addr.s_addr != 0)
{ {
if (IS_DEBUG_OSPF (lsa, LSA)) if (IS_DEBUG_OSPF (lsa, LSA))
zlog_debug ("ospf_ase_calculate(): " zlog_debug ("ospf_ase_calculate(): Forwarding address is not 0.0.0.0.");
"Forwarding address is not 0.0.0.0.");
if (! ospf_ase_forward_address_check (ospf, al->e[0].fwd_addr)) if (! ospf_ase_forward_address_check (ospf, al->e[0].fwd_addr))
{ {
if (IS_DEBUG_OSPF (lsa, LSA)) if (IS_DEBUG_OSPF (lsa, LSA))
zlog_debug ("ospf_ase_calculate(): " zlog_debug ("ospf_ase_calculate(): Forwarding address is one of our addresses, Ignore.");
"Forwarding address is one of our addresses, Ignore.");
return NULL; return NULL;
} }
if (IS_DEBUG_OSPF (lsa, LSA)) if (IS_DEBUG_OSPF (lsa, LSA))
zlog_debug ("ospf_ase_calculate(): " zlog_debug ("ospf_ase_calculate(): Looking up in the Network Routing Table.");
"Looking up in the Network Routing Table.");
/* Looking up the path to the fwd_addr from Network route. */ /* Looking up the path to the fwd_addr from Network route. */
asbr.family = AF_INET; asbr.family = AF_INET;
@ -219,8 +216,7 @@ ospf_ase_calculate_asbr_route (struct ospf *ospf,
if (rn == NULL) if (rn == NULL)
{ {
if (IS_DEBUG_OSPF (lsa, LSA)) if (IS_DEBUG_OSPF (lsa, LSA))
zlog_debug ("ospf_ase_calculate(): " zlog_debug ("ospf_ase_calculate(): Couldn't find a route to the forwarding address.");
"Couldn't find a route to the forwarding address.");
return NULL; return NULL;
} }
@ -229,8 +225,7 @@ ospf_ase_calculate_asbr_route (struct ospf *ospf,
if ((asbr_route = rn->info) == NULL) if ((asbr_route = rn->info) == NULL)
{ {
if (IS_DEBUG_OSPF (lsa, LSA)) if (IS_DEBUG_OSPF (lsa, LSA))
zlog_debug ("ospf_ase_calculate(): " zlog_debug ("ospf_ase_calculate(): Somehow OSPF route to ASBR is lost");
"Somehow OSPF route to ASBR is lost");
return NULL; return NULL;
} }
} }
@ -393,8 +388,7 @@ int ospf_ase_calculate_route(struct ospf *ospf, struct ospf_lsa *lsa)
if (!ospf_ase_forward_address_check(ospf, al->e[0].fwd_addr)) { if (!ospf_ase_forward_address_check(ospf, al->e[0].fwd_addr)) {
if (IS_DEBUG_OSPF(lsa, LSA)) if (IS_DEBUG_OSPF(lsa, LSA))
zlog_debug( zlog_debug(
"Route[External]: Forwarding address is our router " "Route[External]: Forwarding address is our router address");
"address");
return 0; return 0;
} }
@ -407,8 +401,7 @@ int ospf_ase_calculate_route(struct ospf *ospf, struct ospf_lsa *lsa)
if (rn == NULL || (asbr_route = rn->info) == NULL) { if (rn == NULL || (asbr_route = rn->info) == NULL) {
if (IS_DEBUG_OSPF(lsa, LSA)) if (IS_DEBUG_OSPF(lsa, LSA))
zlog_debug( zlog_debug(
"Route[External]: Can't find route to forwarding " "Route[External]: Can't find route to forwarding address");
"address");
if (rn) if (rn)
route_unlock_node(rn); route_unlock_node(rn);
return 0; return 0;

View file

@ -491,8 +491,7 @@ uint32_t ospf_ext_schedule_prefix_index(struct interface *ifp, uint32_t index,
return rc; return rc;
if (p != NULL) { if (p != NULL) {
osr_debug("EXT (%s): Schedule new prefix %pFX with index %u " osr_debug("EXT (%s): Schedule new prefix %pFX with index %u on interface %s", __func__, p, index, ifp->name);
"on interface %s", __func__, p, index, ifp->name);
/* Set first Extended Prefix then the Prefix SID information */ /* Set first Extended Prefix then the Prefix SID information */
set_ext_prefix(exti, OSPF_PATH_INTRA_AREA, EXT_TLV_PREF_NFLG, set_ext_prefix(exti, OSPF_PATH_INTRA_AREA, EXT_TLV_PREF_NFLG,
@ -1006,8 +1005,7 @@ static struct ospf_lsa *ospf_ext_pref_lsa_new(struct ospf_area *area,
lsa_header_set(s, options, lsa_type, lsa_id, router_id); lsa_header_set(s, options, lsa_type, lsa_id, router_id);
osr_debug( osr_debug(
"EXT (%s): LSA[Type%u:%pI4]: Create an Opaque-LSA Extended " "EXT (%s): LSA[Type%u:%pI4]: Create an Opaque-LSA Extended Prefix Opaque LSA instance",
"Prefix Opaque LSA instance",
__func__, lsa_type, &lsa_id); __func__, lsa_type, &lsa_id);
/* Set opaque-LSA body fields. */ /* Set opaque-LSA body fields. */
@ -1064,8 +1062,7 @@ static struct ospf_lsa *ospf_ext_link_lsa_new(struct ospf_area *area,
lsa_id.s_addr = htonl(tmp); lsa_id.s_addr = htonl(tmp);
osr_debug( osr_debug(
"EXT (%s) LSA[Type%u:%pI4]: Create an Opaque-LSA Extended " "EXT (%s) LSA[Type%u:%pI4]: Create an Opaque-LSA Extended Link Opaque LSA instance",
"Link Opaque LSA instance",
__func__, lsa_type, &lsa_id); __func__, lsa_type, &lsa_id);
/* Set opaque-LSA header fields. */ /* Set opaque-LSA header fields. */
@ -1130,8 +1127,7 @@ static int ospf_ext_pref_lsa_originate1(struct ospf_area *area,
ospf_flood_through_area(area, NULL /*nbr */, new); ospf_flood_through_area(area, NULL /*nbr */, new);
osr_debug( osr_debug(
"EXT (%s): LSA[Type%u:%pI4]: Originate Opaque-LSA" "EXT (%s): LSA[Type%u:%pI4]: Originate Opaque-LSAExtended Prefix Opaque LSA: Area(%pI4), Link(%s)",
"Extended Prefix Opaque LSA: Area(%pI4), Link(%s)",
__func__, new->data->type, &new->data->id, __func__, new->data->type, &new->data->id,
&area->area_id, exti->ifp->name); &area->area_id, exti->ifp->name);
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
@ -1178,8 +1174,7 @@ static int ospf_ext_link_lsa_originate1(struct ospf_area *area,
ospf_flood_through_area(area, NULL /*nbr */, new); ospf_flood_through_area(area, NULL /*nbr */, new);
osr_debug( osr_debug(
"EXT (%s): LSA[Type%u:%pI4]: Originate Opaque-LSA " "EXT (%s): LSA[Type%u:%pI4]: Originate Opaque-LSA Extended Link Opaque LSA: Area(%pI4), Link(%s)",
"Extended Link Opaque LSA: Area(%pI4), Link(%s)",
__func__, new->data->type, &new->data->id, __func__, new->data->type, &new->data->id,
&area->area_id, exti->ifp->name); &area->area_id, exti->ifp->name);
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
@ -1237,8 +1232,7 @@ static int ospf_ext_pref_lsa_originate(void *arg)
/* Ok, let's try to originate an LSA */ /* Ok, let's try to originate an LSA */
osr_debug( osr_debug(
"EXT (%s): Let's finally re-originate the LSA 7.0.0.%u " "EXT (%s): Let's finally re-originate the LSA 7.0.0.%u for Itf %s", __func__, exti->instance,
"for Itf %s", __func__, exti->instance,
exti->ifp ? exti->ifp->name : ""); exti->ifp ? exti->ifp->name : "");
ospf_ext_pref_lsa_originate1(area, exti); ospf_ext_pref_lsa_originate1(area, exti);
} }
@ -1300,8 +1294,7 @@ static int ospf_ext_link_lsa_originate(void *arg)
/* Ok, let's try to originate an LSA */ /* Ok, let's try to originate an LSA */
osr_debug( osr_debug(
"EXT (%s): Let's finally reoriginate the LSA 8.0.0.%u " "EXT (%s): Let's finally reoriginate the LSA 8.0.0.%u for Itf %s through the Area %pI4", __func__,
"for Itf %s through the Area %pI4", __func__,
exti->instance, exti->ifp ? exti->ifp->name : "-", exti->instance, exti->ifp ? exti->ifp->name : "-",
&area->area_id); &area->area_id);
ospf_ext_link_lsa_originate1(area, exti); ospf_ext_link_lsa_originate1(area, exti);
@ -1625,8 +1618,7 @@ static uint16_t show_vty_ext_link_rmt_itf_addr(struct vty *vty,
top = (struct ext_subtlv_rmt_itf_addr *)tlvh; top = (struct ext_subtlv_rmt_itf_addr *)tlvh;
vty_out(vty, vty_out(vty,
" Remote Interface Address Sub-TLV: Length %u\n " " Remote Interface Address Sub-TLV: Length %u\n Address: %s\n",
"Address: %s\n",
ntohs(top->header.length), inet_ntoa(top->value)); ntohs(top->header.length), inet_ntoa(top->value));
return TLV_SIZE(tlvh); return TLV_SIZE(tlvh);
@ -1639,8 +1631,7 @@ static uint16_t show_vty_ext_link_adj_sid(struct vty *vty,
struct ext_subtlv_adj_sid *top = (struct ext_subtlv_adj_sid *)tlvh; struct ext_subtlv_adj_sid *top = (struct ext_subtlv_adj_sid *)tlvh;
vty_out(vty, vty_out(vty,
" Adj-SID Sub-TLV: Length %u\n\tFlags: " " Adj-SID Sub-TLV: Length %u\n\tFlags: 0x%x\n\tMT-ID:0x%x\n\tWeight: 0x%x\n\t%s: %u\n",
"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, ntohs(top->header.length), top->flags, top->mtid, top->weight,
CHECK_FLAG(top->flags, EXT_SUBTLV_LINK_ADJ_SID_VFLG) ? "Label" CHECK_FLAG(top->flags, EXT_SUBTLV_LINK_ADJ_SID_VFLG) ? "Label"
: "Index", : "Index",
@ -1659,9 +1650,7 @@ static uint16_t show_vty_ext_link_lan_adj_sid(struct vty *vty,
(struct ext_subtlv_lan_adj_sid *)tlvh; (struct ext_subtlv_lan_adj_sid *)tlvh;
vty_out(vty, vty_out(vty,
" LAN-Adj-SID Sub-TLV: Length %u\n\tFlags: " " 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",
"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, ntohs(top->header.length), top->flags, top->mtid, top->weight,
inet_ntoa(top->neighbor_id), inet_ntoa(top->neighbor_id),
CHECK_FLAG(top->flags, EXT_SUBTLV_LINK_ADJ_SID_VFLG) ? "Label" CHECK_FLAG(top->flags, EXT_SUBTLV_LINK_ADJ_SID_VFLG) ? "Label"
@ -1749,8 +1738,7 @@ static uint16_t show_vty_ext_pref_pref_sid(struct vty *vty,
(struct ext_subtlv_prefix_sid *)tlvh; (struct ext_subtlv_prefix_sid *)tlvh;
vty_out(vty, vty_out(vty,
" Prefix SID Sub-TLV: Length %u\n\tAlgorithm: " " Prefix SID Sub-TLV: Length %u\n\tAlgorithm: %u\n\tFlags: 0x%x\n\tMT-ID:0x%x\n\t%s: %u\n",
"%u\n\tFlags: 0x%x\n\tMT-ID:0x%x\n\t%s: %u\n",
ntohs(top->header.length), top->algorithm, top->flags, ntohs(top->header.length), top->algorithm, top->flags,
top->mtid, top->mtid,
CHECK_FLAG(top->flags, EXT_SUBTLV_PREFIX_SID_VFLG) ? "Label" CHECK_FLAG(top->flags, EXT_SUBTLV_PREFIX_SID_VFLG) ? "Label"

View file

@ -507,8 +507,7 @@ static int ospf_flood_through_interface(struct ospf_interface *oi,
if (NBR_IS_DR(inbr) || NBR_IS_BDR(inbr)) { if (NBR_IS_DR(inbr) || NBR_IS_BDR(inbr)) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_flood_through_interface(): " "ospf_flood_through_interface(): DR/BDR NOT SEND to int %s",
"DR/BDR NOT SEND to int %s",
IF_NAME(oi)); IF_NAME(oi));
return 1; return 1;
} }
@ -522,8 +521,7 @@ static int ospf_flood_through_interface(struct ospf_interface *oi,
if (oi->state == ISM_Backup) { if (oi->state == ISM_Backup) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_flood_through_interface(): " "ospf_flood_through_interface(): ISM_Backup NOT SEND to int %s",
"ISM_Backup NOT SEND to int %s",
IF_NAME(oi)); IF_NAME(oi));
return 1; return 1;
} }
@ -538,8 +536,7 @@ static int ospf_flood_through_interface(struct ospf_interface *oi,
/* XXX HASSO: Is this IS_DEBUG_OSPF_NSSA really correct? */ /* XXX HASSO: Is this IS_DEBUG_OSPF_NSSA really correct? */
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_flood_through_interface(): " "ospf_flood_through_interface(): DR/BDR sending upd to int %s",
"DR/BDR sending upd to int %s",
IF_NAME(oi)); IF_NAME(oi));
/* RFC2328 Section 13.3 /* RFC2328 Section 13.3

View file

@ -88,8 +88,7 @@ static void ospf_ia_network_route(struct ospf *ospf, struct route_table *rt,
if ((or = rn1->info)) { if ((or = rn1->info)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_ia_network_route(): " "ospf_ia_network_route(): Found a route to the same network");
"Found a route to the same network");
/* Check the existing route. */ /* Check the existing route. */
if ((res = ospf_route_cmp(ospf, new_or, or)) < 0) { if ((res = ospf_route_cmp(ospf, new_or, or)) < 0) {
/* New route is better, so replace old one. */ /* New route is better, so replace old one. */
@ -151,8 +150,7 @@ static void ospf_ia_router_route(struct ospf *ospf, struct route_table *rtrs,
if (or) { if (or) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_ia_router_route(): " "ospf_ia_router_route(): a route to the same ABR through the same area exists");
"a route to the same ABR through the same area exists");
/* New route is better */ /* New route is better */
if ((ret = ospf_route_cmp(ospf, new_or, or)) < 0) { if ((ret = ospf_route_cmp(ospf, new_or, or)) < 0) {
listnode_delete(rn->info, or); listnode_delete(rn->info, or);
@ -329,8 +327,7 @@ static void ospf_update_network_route(struct ospf *ospf, struct route_table *rt,
backbone paths */ backbone paths */
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_update_network_route(): " "ospf_update_network_route(): Allowing Shortcut ABR to add new route");
"Allowing Shortcut ABR to add new route");
new_or = ospf_route_new(); new_or = ospf_route_new();
new_or->type = OSPF_DESTINATION_NETWORK; new_or->type = OSPF_DESTINATION_NETWORK;
new_or->id = lsa->header.id; new_or->id = lsa->header.id;
@ -367,8 +364,7 @@ static void ospf_update_network_route(struct ospf *ospf, struct route_table *rt,
or->u.std.area_id)) { or->u.std.area_id)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_update_network_route(): Shortcut: " "ospf_update_network_route(): Shortcut: this intra-area path is not backbone");
"this intra-area path is not backbone");
return; return;
} }
} else /* Not Shortcut ABR */ } else /* Not Shortcut ABR */
@ -376,8 +372,7 @@ static void ospf_update_network_route(struct ospf *ospf, struct route_table *rt,
if (!OSPF_IS_AREA_ID_BACKBONE(or->u.std.area_id)) { if (!OSPF_IS_AREA_ID_BACKBONE(or->u.std.area_id)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_update_network_route(): " "ospf_update_network_route(): route is not BB-associated");
"route is not BB-associated");
return; /* We can update only BB routes */ return; /* We can update only BB routes */
} }
} }
@ -392,16 +387,14 @@ static void ospf_update_network_route(struct ospf *ospf, struct route_table *rt,
if (or->cost == cost) { if (or->cost == cost) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_update_network_route(): " "ospf_update_network_route(): new route is same distance, adding nexthops");
"new route is same distance, adding nexthops");
ospf_route_copy_nexthops(or, abr_or->paths); ospf_route_copy_nexthops(or, abr_or->paths);
} }
if (or->cost > cost) { if (or->cost > cost) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_update_network_route(): " "ospf_update_network_route(): new route is better, overriding nexthops");
"new route is better, overriding nexthops");
ospf_route_subst_nexthops(or, abr_or->paths); ospf_route_subst_nexthops(or, abr_or->paths);
or->cost = cost; or->cost = cost;
@ -649,8 +642,7 @@ void ospf_ia_routing(struct ospf *ospf, struct route_table *rt,
*/ */
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_ia_routing(): " "ospf_ia_routing(): Active BB connection not found");
"Active BB connection not found");
for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, for (ALL_LIST_ELEMENTS_RO(ospf->areas, node,
area)) area))
OSPF_EXAMINE_SUMMARIES_ALL(area, rt, OSPF_EXAMINE_SUMMARIES_ALL(area, rt,

View file

@ -839,8 +839,7 @@ struct ospf_interface *ospf_vl_new(struct ospf *ospf,
if (vlink_count == OSPF_VL_MAX_COUNT) { if (vlink_count == OSPF_VL_MAX_COUNT) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_vl_new(): Alarm: " "ospf_vl_new(): Alarm: cannot create more than OSPF_MAX_VL_COUNT virtual links");
"cannot create more than OSPF_MAX_VL_COUNT virtual links");
return NULL; return NULL;
} }
@ -1118,8 +1117,7 @@ void ospf_vl_up_check(struct ospf_area *area, struct in_addr rid,
if (ospf_vl_set_params(vl_data, v)) { if (ospf_vl_set_params(vl_data, v)) {
if (IS_DEBUG_OSPF(ism, ISM_EVENTS)) if (IS_DEBUG_OSPF(ism, ISM_EVENTS))
zlog_debug( zlog_debug(
"ospf_vl_up_check: VL cost change," "ospf_vl_up_check: VL cost change, scheduling router lsa refresh");
" scheduling router lsa refresh");
if (ospf->backbone) if (ospf->backbone)
ospf_router_lsa_update_area( ospf_router_lsa_update_area(
ospf->backbone); ospf->backbone);

View file

@ -525,8 +525,7 @@ static int lsa_link_broadcast_set(struct stream **s, struct ospf_interface *oi)
if (oi->state == ISM_Waiting) { if (oi->state == ISM_Waiting) {
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
zlog_debug( zlog_debug(
"LSA[Type1]: Interface %s is in state Waiting. " "LSA[Type1]: Interface %s is in state Waiting. Adding stub interface",
"Adding stub interface",
oi->ifp->name); oi->ifp->name);
masklen2ip(oi->address->prefixlen, &mask); masklen2ip(oi->address->prefixlen, &mask);
id.s_addr = oi->address->u.prefix4.s_addr & mask.s_addr; id.s_addr = oi->address->u.prefix4.s_addr & mask.s_addr;
@ -541,8 +540,7 @@ static int lsa_link_broadcast_set(struct stream **s, struct ospf_interface *oi)
&& ospf_nbr_count(oi, NSM_Full) > 0) { && ospf_nbr_count(oi, NSM_Full) > 0) {
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
zlog_debug( zlog_debug(
"LSA[Type1]: Interface %s has a DR. " "LSA[Type1]: Interface %s has a DR. Adding transit interface",
"Adding transit interface",
oi->ifp->name); oi->ifp->name);
return link_info_set(s, DR(oi), oi->address->u.prefix4, return link_info_set(s, DR(oi), oi->address->u.prefix4,
LSA_LINK_TYPE_TRANSIT, 0, cost); LSA_LINK_TYPE_TRANSIT, 0, cost);
@ -551,8 +549,7 @@ static int lsa_link_broadcast_set(struct stream **s, struct ospf_interface *oi)
else { else {
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
zlog_debug( zlog_debug(
"LSA[Type1]: Interface %s has no DR. " "LSA[Type1]: Interface %s has no DR. Adding stub interface",
"Adding stub interface",
oi->ifp->name); oi->ifp->name);
masklen2ip(oi->address->prefixlen, &mask); masklen2ip(oi->address->prefixlen, &mask);
id.s_addr = oi->address->u.prefix4.s_addr & mask.s_addr; id.s_addr = oi->address->u.prefix4.s_addr & mask.s_addr;
@ -1084,8 +1081,7 @@ static struct ospf_lsa *ospf_network_lsa_refresh(struct ospf_lsa *lsa)
if (oi == NULL) { if (oi == NULL) {
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) { if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
zlog_debug( zlog_debug(
"LSA[Type%d:%s]: network-LSA refresh: " "LSA[Type%d:%s]: network-LSA refresh: no oi found, ick, ignoring.",
"no oi found, ick, ignoring.",
lsa->data->type, inet_ntoa(lsa->data->id)); lsa->data->type, inet_ntoa(lsa->data->id));
ospf_lsa_header_dump(lsa->data); ospf_lsa_header_dump(lsa->data);
} }
@ -1761,8 +1757,7 @@ static struct ospf_lsa *ospf_lsa_translated_nssa_new(struct ospf *ospf,
== NULL) { == NULL) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_nssa_translate_originate(): Could not originate " "ospf_nssa_translate_originate(): Could not originate Translated Type-5 for %s",
"Translated Type-5 for %s",
inet_ntoa(ei.p.prefix)); inet_ntoa(ei.p.prefix));
return NULL; return NULL;
} }
@ -1796,8 +1791,7 @@ struct ospf_lsa *ospf_translated_nssa_originate(struct ospf *ospf,
if ((new = ospf_lsa_translated_nssa_new(ospf, type7)) == NULL) { if ((new = ospf_lsa_translated_nssa_new(ospf, type7)) == NULL) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_translated_nssa_originate(): Could not translate " "ospf_translated_nssa_originate(): Could not translate Type-7, Id %s, to Type-5",
"Type-7, Id %s, to Type-5",
inet_ntoa(type7->data->id)); inet_ntoa(type7->data->id));
return NULL; return NULL;
} }
@ -1806,8 +1800,7 @@ struct ospf_lsa *ospf_translated_nssa_originate(struct ospf *ospf,
if (IS_DEBUG_OSPF_NSSA) { if (IS_DEBUG_OSPF_NSSA) {
zlog_debug( zlog_debug(
"ospf_translated_nssa_originate(): " "ospf_translated_nssa_originate(): translated Type 7, installed:");
"translated Type 7, installed:");
ospf_lsa_header_dump(new->data); ospf_lsa_header_dump(new->data);
zlog_debug(" Network mask: %d", ip_masklen(extnew->mask)); zlog_debug(" Network mask: %d", ip_masklen(extnew->mask));
zlog_debug(" Forward addr: %s", zlog_debug(" Forward addr: %s",
@ -1816,9 +1809,7 @@ struct ospf_lsa *ospf_translated_nssa_originate(struct ospf *ospf,
if ((new = ospf_lsa_install(ospf, NULL, new)) == NULL) { if ((new = ospf_lsa_install(ospf, NULL, new)) == NULL) {
flog_warn(EC_OSPF_LSA_INSTALL_FAILURE, flog_warn(EC_OSPF_LSA_INSTALL_FAILURE,
"ospf_lsa_translated_nssa_originate(): " "ospf_lsa_translated_nssa_originate(): Could not install LSA id %s",
"Could not install LSA "
"id %s",
inet_ntoa(type7->data->id)); inet_ntoa(type7->data->id));
return NULL; return NULL;
} }
@ -1885,8 +1876,7 @@ struct ospf_lsa *ospf_translated_nssa_refresh(struct ospf *ospf,
if (!type7) { if (!type7) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_translated_nssa_refresh(): no Type-7 found for " "ospf_translated_nssa_refresh(): no Type-7 found for Type-5 LSA Id %s",
"Type-5 LSA Id %s",
inet_ntoa(type5->data->id)); inet_ntoa(type5->data->id));
return NULL; return NULL;
} }
@ -1895,8 +1885,7 @@ struct ospf_lsa *ospf_translated_nssa_refresh(struct ospf *ospf,
if (type5 == NULL || !CHECK_FLAG(type5->flags, OSPF_LSA_LOCAL_XLT)) { if (type5 == NULL || !CHECK_FLAG(type5->flags, OSPF_LSA_LOCAL_XLT)) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_translated_nssa_refresh(): No translated Type-5 " "ospf_translated_nssa_refresh(): No translated Type-5 found for Type-7 with Id %s",
"found for Type-7 with Id %s",
inet_ntoa(type7->data->id)); inet_ntoa(type7->data->id));
return NULL; return NULL;
} }
@ -1908,8 +1897,7 @@ struct ospf_lsa *ospf_translated_nssa_refresh(struct ospf *ospf,
if ((new = ospf_lsa_translated_nssa_new(ospf, type7)) == NULL) { if ((new = ospf_lsa_translated_nssa_new(ospf, type7)) == NULL) {
if (IS_DEBUG_OSPF_NSSA) if (IS_DEBUG_OSPF_NSSA)
zlog_debug( zlog_debug(
"ospf_translated_nssa_refresh(): Could not translate " "ospf_translated_nssa_refresh(): Could not translate Type-7 for %s to Type-5",
"Type-7 for %s to Type-5",
inet_ntoa(type7->data->id)); inet_ntoa(type7->data->id));
return NULL; return NULL;
} }
@ -2269,8 +2257,7 @@ struct ospf_lsa *ospf_external_lsa_refresh(struct ospf *ospf,
if (!ospf_redistribute_check(ospf, ei, &changed)) { if (!ospf_redistribute_check(ospf, ei, &changed)) {
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
zlog_debug( zlog_debug(
"LSA[Type%d:%s]: Could not be refreshed, " "LSA[Type%d:%s]: Could not be refreshed, redist check fail",
"redist check fail",
lsa->data->type, inet_ntoa(lsa->data->id)); lsa->data->type, inet_ntoa(lsa->data->id));
ospf_external_lsa_flush(ospf, ei->type, &ei->p, ospf_external_lsa_flush(ospf, ei->type, &ei->p,
ei->ifindex /*, ei->nexthop */); ei->ifindex /*, ei->nexthop */);
@ -2616,8 +2603,7 @@ struct ospf_lsa *ospf_lsa_install(struct ospf *ospf, struct ospf_interface *oi,
if (IS_DEBUG_OSPF(lsa, LSA_REFRESH)) { if (IS_DEBUG_OSPF(lsa, LSA_REFRESH)) {
zlog_debug( zlog_debug(
"ospf_lsa_install() Premature Aging " "ospf_lsa_install() Premature Aging lsa 0x%p, seqnum 0x%x",
"lsa 0x%p, seqnum 0x%x",
(void *)lsa, (void *)lsa,
ntohl(lsa->data->ls_seqnum)); ntohl(lsa->data->ls_seqnum));
ospf_lsa_header_dump(lsa->data); ospf_lsa_header_dump(lsa->data);
@ -2625,8 +2611,7 @@ struct ospf_lsa *ospf_lsa_install(struct ospf *ospf, struct ospf_interface *oi,
} else { } else {
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) { if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) {
zlog_debug( zlog_debug(
"ospf_lsa_install() got an lsa with seq 0x80000000 " "ospf_lsa_install() got an lsa with seq 0x80000000 that was not self originated. Ignoring\n");
"that was not self originated. Ignoring\n");
ospf_lsa_header_dump(lsa->data); ospf_lsa_header_dump(lsa->data);
} }
return old; return old;
@ -3368,8 +3353,7 @@ struct in_addr ospf_lsa_unique_id(struct ospf *ospf, struct ospf_lsdb *lsdb,
if (ip_masklen(al->mask) == p->prefixlen) { if (ip_masklen(al->mask) == p->prefixlen) {
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
zlog_debug( zlog_debug(
"ospf_lsa_unique_id(): " "ospf_lsa_unique_id(): Can't get Link State ID for %s/%d",
"Can't get Link State ID for %s/%d",
inet_ntoa(p->prefix), p->prefixlen); inet_ntoa(p->prefix), p->prefixlen);
/* id.s_addr = 0; */ /* id.s_addr = 0; */
id.s_addr = 0xffffffff; id.s_addr = 0xffffffff;
@ -3386,8 +3370,7 @@ struct in_addr ospf_lsa_unique_id(struct ospf *ospf, struct ospf_lsdb *lsdb,
if (lsa) { if (lsa) {
if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) if (IS_DEBUG_OSPF(lsa, LSA_GENERATE))
zlog_debug( zlog_debug(
"ospf_lsa_unique_id(): " "ospf_lsa_unique_id(): Can't get Link State ID for %s/%d",
"Can't get Link State ID for %s/%d",
inet_ntoa(p->prefix), inet_ntoa(p->prefix),
p->prefixlen); p->prefixlen);
/* id.s_addr = 0; */ /* id.s_addr = 0; */
@ -3550,8 +3533,7 @@ void ospf_refresher_register_lsa(struct ospf *ospf, struct ospf_lsa *lsa)
if (IS_DEBUG_OSPF(lsa, LSA_REFRESH)) if (IS_DEBUG_OSPF(lsa, LSA_REFRESH))
zlog_debug( zlog_debug(
"LSA[Refresh:Type%d:%s]: ospf_refresher_register_lsa(): " "LSA[Refresh:Type%d:%s]: ospf_refresher_register_lsa(): setting refresh_list on lsa %p (slod %d)",
"setting refresh_list on lsa %p (slod %d)",
lsa->data->type, inet_ntoa(lsa->data->id), lsa->data->type, inet_ntoa(lsa->data->id),
(void *)lsa, index); (void *)lsa, index);
} }
@ -3609,8 +3591,7 @@ int ospf_lsa_refresh_walker(struct thread *t)
i = (i + 1) % OSPF_LSA_REFRESHER_SLOTS) { i = (i + 1) % OSPF_LSA_REFRESHER_SLOTS) {
if (IS_DEBUG_OSPF(lsa, LSA_REFRESH)) if (IS_DEBUG_OSPF(lsa, LSA_REFRESH))
zlog_debug( zlog_debug(
"LSA[Refresh]: ospf_lsa_refresh_walker(): " "LSA[Refresh]: ospf_lsa_refresh_walker(): refresh index %d",
"refresh index %d",
i); i);
refresh_list = ospf->lsa_refresh_queue.qs[i]; refresh_list = ospf->lsa_refresh_queue.qs[i];
@ -3624,8 +3605,7 @@ int ospf_lsa_refresh_walker(struct thread *t)
lsa)) { lsa)) {
if (IS_DEBUG_OSPF(lsa, LSA_REFRESH)) if (IS_DEBUG_OSPF(lsa, LSA_REFRESH))
zlog_debug( zlog_debug(
"LSA[Refresh:Type%d:%s]: ospf_lsa_refresh_walker(): " "LSA[Refresh:Type%d:%s]: ospf_lsa_refresh_walker(): refresh lsa %p (slot %d)",
"refresh lsa %p (slot %d)",
lsa->data->type, lsa->data->type,
inet_ntoa(lsa->data->id), inet_ntoa(lsa->data->id),
(void *)lsa, i); (void *)lsa, i);

View file

@ -53,9 +53,7 @@ int ospf_if_add_allspfrouters(struct ospf *top, struct prefix *p,
if (ret < 0) if (ret < 0)
flog_err( flog_err(
EC_LIB_SOCKET, EC_LIB_SOCKET,
"can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, " "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?",
"ifindex %u, AllSPFRouters): %s; perhaps a kernel limit "
"on # of multicast group memberships has been exceeded?",
top->fd, inet_ntoa(p->u.prefix4), ifindex, top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno)); safe_strerror(errno));
else { else {
@ -78,8 +76,7 @@ int ospf_if_drop_allspfrouters(struct ospf *top, struct prefix *p,
ifindex); ifindex);
if (ret < 0) if (ret < 0)
flog_err(EC_LIB_SOCKET, flog_err(EC_LIB_SOCKET,
"can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, " "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllSPFRouters): %s",
"ifindex %u, AllSPFRouters): %s",
top->fd, inet_ntoa(p->u.prefix4), ifindex, top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno)); safe_strerror(errno));
else { else {
@ -104,9 +101,7 @@ int ospf_if_add_alldrouters(struct ospf *top, struct prefix *p,
if (ret < 0) if (ret < 0)
flog_err( flog_err(
EC_LIB_SOCKET, EC_LIB_SOCKET,
"can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, " "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?",
"ifindex %u, AllDRouters): %s; perhaps a kernel limit "
"on # of multicast group memberships has been exceeded?",
top->fd, inet_ntoa(p->u.prefix4), ifindex, top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno)); safe_strerror(errno));
else else
@ -127,8 +122,7 @@ int ospf_if_drop_alldrouters(struct ospf *top, struct prefix *p,
ifindex); ifindex);
if (ret < 0) if (ret < 0)
flog_err(EC_LIB_SOCKET, flog_err(EC_LIB_SOCKET,
"can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, " "can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllDRouters): %s",
"ifindex %u, AllDRouters): %s",
top->fd, inet_ntoa(p->u.prefix4), ifindex, top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno)); safe_strerror(errno));
else else
@ -167,8 +161,7 @@ int ospf_if_ipmulticast(struct ospf *top, struct prefix *p, ifindex_t ifindex)
ret = setsockopt_ipv4_multicast_if(top->fd, p->u.prefix4, ifindex); ret = setsockopt_ipv4_multicast_if(top->fd, p->u.prefix4, ifindex);
if (ret < 0) if (ret < 0)
flog_err(EC_LIB_SOCKET, flog_err(EC_LIB_SOCKET,
"can't setsockopt IP_MULTICAST_IF(fd %d, addr %s, " "can't setsockopt IP_MULTICAST_IF(fd %d, addr %s, ifindex %u): %s",
"ifindex %u): %s",
top->fd, inet_ntoa(p->u.prefix4), ifindex, top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno)); safe_strerror(errno));
#endif #endif

View file

@ -683,8 +683,7 @@ static void nsm_change_state(struct ospf_neighbor *nbr, int state)
if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL)) if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL))
zlog_info( zlog_info(
"%s:[%s:%s], %s -> %s): " "%s:[%s:%s], %s -> %s): scheduling new router-LSA origination",
"scheduling new router-LSA origination",
__func__, inet_ntoa(nbr->router_id), __func__, inet_ntoa(nbr->router_id),
ospf_get_name(oi->ospf), ospf_get_name(oi->ospf),
lookup_msg(ospf_nsm_state_msg, old_state, NULL), lookup_msg(ospf_nsm_state_msg, old_state, NULL),
@ -785,8 +784,7 @@ int ospf_nsm_event(struct thread *thread)
*/ */
flog_err( flog_err(
EC_OSPF_FSM_INVALID_STATE, EC_OSPF_FSM_INVALID_STATE,
"NSM[%s:%s:%s]: %s (%s): " "NSM[%s:%s:%s]: %s (%s): Warning: action tried to change next_state to %s",
"Warning: action tried to change next_state to %s",
IF_NAME(nbr->oi), inet_ntoa(nbr->router_id), IF_NAME(nbr->oi), inet_ntoa(nbr->router_id),
ospf_get_name(nbr->oi->ospf), ospf_get_name(nbr->oi->ospf),
lookup_msg(ospf_nsm_state_msg, nbr->state, lookup_msg(ospf_nsm_state_msg, nbr->state,

View file

@ -1781,8 +1781,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
if (oipt->t_opaque_lsa_self != NULL) { if (oipt->t_opaque_lsa_self != NULL) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"Type-%u Opaque-LSA has already scheduled to" "Type-%u Opaque-LSA has already scheduled to RE-ORIGINATE: [opaque-type=%u]",
" RE-ORIGINATE: [opaque-type=%u]",
lsa_type, lsa_type,
GET_OPAQUE_TYPE(ntohl(lsa->data->id.s_addr))); GET_OPAQUE_TYPE(ntohl(lsa->data->id.s_addr)));
goto out; goto out;
@ -1799,8 +1798,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent,
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"Schedule Type-%u Opaque-LSA to RE-ORIGINATE in %d" "Schedule Type-%u Opaque-LSA to RE-ORIGINATE in %d ms later: [opaque-type=%u]",
" ms later: [opaque-type=%u]",
lsa_type, delay, lsa_type, delay,
GET_OPAQUE_TYPE(ntohl(lsa->data->id.s_addr))); GET_OPAQUE_TYPE(ntohl(lsa->data->id.s_addr)));
@ -1919,8 +1917,7 @@ static int ospf_opaque_type10_lsa_reoriginate_timer(struct thread *t)
if (n == 0 || !CHECK_FLAG(top->config, OSPF_OPAQUE_CAPABLE)) { if (n == 0 || !CHECK_FLAG(top->config, OSPF_OPAQUE_CAPABLE)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"Suspend re-origination of Type-10 Opaque-LSAs" "Suspend re-origination of Type-10 Opaque-LSAs (opaque-type=%u) for a while...",
" (opaque-type=%u) for a while...",
oipt->opaque_type); oipt->opaque_type);
oipt->status = PROC_SUSPEND; oipt->status = PROC_SUSPEND;
@ -1930,8 +1927,7 @@ static int ospf_opaque_type10_lsa_reoriginate_timer(struct thread *t)
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"Timer[Type10-LSA]: Re-originate Opaque-LSAs" "Timer[Type10-LSA]: Re-originate Opaque-LSAs (opaque-type=%u) for Area %s",
" (opaque-type=%u) for Area %s",
oipt->opaque_type, inet_ntoa(area->area_id)); oipt->opaque_type, inet_ntoa(area->area_id));
rc = (*functab->lsa_originator)(area); rc = (*functab->lsa_originator)(area);

View file

@ -604,8 +604,7 @@ static void ospf_write_frags(int fd, struct ospf_packet *op, struct ip *iph,
if (ret < 0) if (ret < 0)
flog_err( flog_err(
EC_LIB_SOCKET, EC_LIB_SOCKET,
"*** ospf_write_frags: sendmsg failed to %s," "*** ospf_write_frags: sendmsg failed to %s, id %d, off %d, len %d, mtu %u failed with %s",
" id %d, off %d, len %d, mtu %u failed with %s",
inet_ntoa(iph->ip_dst), iph->ip_id, iph->ip_off, inet_ntoa(iph->ip_dst), iph->ip_id, iph->ip_off,
iph->ip_len, mtu, safe_strerror(errno)); iph->ip_len, mtu, safe_strerror(errno));
@ -798,16 +797,14 @@ static int ospf_write(struct thread *thread)
sockopt_iphdrincl_swab_systoh(&iph); sockopt_iphdrincl_swab_systoh(&iph);
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_write to %s, " "ospf_write to %s, id %d, off %d, len %d, interface %s, mtu %u:",
"id %d, off %d, len %d, interface %s, mtu %u:",
inet_ntoa(iph.ip_dst), iph.ip_id, iph.ip_off, inet_ntoa(iph.ip_dst), iph.ip_id, iph.ip_off,
iph.ip_len, oi->ifp->name, oi->ifp->mtu); iph.ip_len, oi->ifp->name, oi->ifp->mtu);
if (ret < 0) if (ret < 0)
flog_err( flog_err(
EC_LIB_SOCKET, EC_LIB_SOCKET,
"*** sendmsg in ospf_write failed to %s, " "*** sendmsg in ospf_write failed to %s, id %d, off %d, len %d, interface %s, mtu %u: %s",
"id %d, off %d, len %d, interface %s, mtu %u: %s",
inet_ntoa(iph.ip_dst), iph.ip_id, iph.ip_off, inet_ntoa(iph.ip_dst), iph.ip_id, iph.ip_off,
iph.ip_len, oi->ifp->name, oi->ifp->mtu, iph.ip_len, oi->ifp->name, oi->ifp->mtu,
safe_strerror(errno)); safe_strerror(errno));
@ -897,8 +894,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
if (IPV4_ADDR_SAME(&ospfh->router_id, &oi->ospf->router_id)) { if (IPV4_ADDR_SAME(&ospfh->router_id, &oi->ospf->router_id)) {
if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV)) { if (IS_DEBUG_OSPF_PACKET(ospfh->type - 1, RECV)) {
zlog_debug( zlog_debug(
"ospf_header[%s/%s]: selforiginated, " "ospf_header[%s/%s]: selforiginated, dropping.",
"dropping.",
lookup_msg(ospf_packet_type_str, ospfh->type, lookup_msg(ospf_packet_type_str, ospfh->type,
NULL), NULL),
inet_ntoa(iph->ip_src)); inet_ntoa(iph->ip_src));
@ -927,8 +923,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
/* Compare Router Dead Interval. */ /* Compare Router Dead Interval. */
if (OSPF_IF_PARAM(oi, v_wait) != ntohl(hello->dead_interval)) { if (OSPF_IF_PARAM(oi, v_wait) != ntohl(hello->dead_interval)) {
flog_warn(EC_OSPF_PACKET, flog_warn(EC_OSPF_PACKET,
"Packet %s [Hello:RECV]: RouterDeadInterval mismatch " "Packet %s [Hello:RECV]: RouterDeadInterval mismatch (expected %u, but received %u).",
"(expected %u, but received %u).",
inet_ntoa(ospfh->router_id), inet_ntoa(ospfh->router_id),
OSPF_IF_PARAM(oi, v_wait), OSPF_IF_PARAM(oi, v_wait),
ntohl(hello->dead_interval)); ntohl(hello->dead_interval));
@ -941,8 +936,7 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
!= ntohs(hello->hello_interval)) { != ntohs(hello->hello_interval)) {
flog_warn( flog_warn(
EC_OSPF_PACKET, EC_OSPF_PACKET,
"Packet %s [Hello:RECV]: HelloInterval mismatch " "Packet %s [Hello:RECV]: HelloInterval mismatch (expected %u, but received %u).",
"(expected %u, but received %u).",
inet_ntoa(ospfh->router_id), inet_ntoa(ospfh->router_id),
OSPF_IF_PARAM(oi, v_hello), OSPF_IF_PARAM(oi, v_hello),
ntohs(hello->hello_interval)); ntohs(hello->hello_interval));
@ -1213,8 +1207,7 @@ static void ospf_db_desc_proc(struct stream *s, struct ospf_interface *oi,
*/ */
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"Packet [DD:RECV]: LSA received Type %d, " "Packet [DD:RECV]: LSA received Type %d, ID %s is not recent.",
"ID %s is not recent.",
lsah->type, inet_ntoa(lsah->id)); lsah->type, inet_ntoa(lsah->id));
ospf_lsa_discard(new); ospf_lsa_discard(new);
} }
@ -1402,8 +1395,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
if (CHECK_FLAG(oi->ospf->config, if (CHECK_FLAG(oi->ospf->config,
OSPF_LOG_ADJACENCY_DETAIL)) OSPF_LOG_ADJACENCY_DETAIL))
zlog_info( zlog_info(
"Packet[DD]: Neighbor %s: Initial DBD from Slave, " "Packet[DD]: Neighbor %s: Initial DBD from Slave, ignoring.",
"ignoring.",
inet_ntoa(nbr->router_id)); inet_ntoa(nbr->router_id));
break; break;
} }
@ -1527,8 +1519,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
if (IS_SET_DD_MS(nbr->dd_flags)) { if (IS_SET_DD_MS(nbr->dd_flags)) {
/* Master should discard duplicate DD packet. */ /* Master should discard duplicate DD packet. */
zlog_info( zlog_info(
"Packet[DD]: Neighbor %s duplicated, " "Packet[DD]: Neighbor %s duplicated, packet discarded.",
"packet discarded.",
inet_ntoa(nbr->router_id)); inet_ntoa(nbr->router_id));
break; break;
} else { } else {
@ -1848,8 +1839,7 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
if (nbr->state < NSM_Exchange) { if (nbr->state < NSM_Exchange) {
if (IS_DEBUG_OSPF(nsm, NSM_EVENTS)) if (IS_DEBUG_OSPF(nsm, NSM_EVENTS))
zlog_debug( zlog_debug(
"Link State Update: " "Link State Update: Neighbor[%s] state %s is less than Exchange",
"Neighbor[%s] state %s is less than Exchange",
inet_ntoa(ospfh->router_id), inet_ntoa(ospfh->router_id),
lookup_msg(ospf_nsm_state_msg, nbr->state, lookup_msg(ospf_nsm_state_msg, nbr->state,
NULL)); NULL));
@ -1948,8 +1938,7 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
char buf3[INET_ADDRSTRLEN]; char buf3[INET_ADDRSTRLEN];
flog_err(EC_OSPF_ROUTER_LSA_MISMATCH, flog_err(EC_OSPF_ROUTER_LSA_MISMATCH,
"Incoming Router-LSA from %s with " "Incoming Router-LSA from %s with Adv-ID[%s] != LS-ID[%s]",
"Adv-ID[%s] != LS-ID[%s]",
inet_ntop(AF_INET, &ospfh->router_id, inet_ntop(AF_INET, &ospfh->router_id,
buf1, INET_ADDRSTRLEN), buf1, INET_ADDRSTRLEN),
inet_ntop(AF_INET, &lsa->data->id, inet_ntop(AF_INET, &lsa->data->id,
@ -1959,8 +1948,7 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
INET_ADDRSTRLEN)); INET_ADDRSTRLEN));
flog_err( flog_err(
EC_OSPF_DOMAIN_CORRUPT, EC_OSPF_DOMAIN_CORRUPT,
"OSPF domain compromised by attack or corruption. " "OSPF domain compromised by attack or corruption. Verify correct operation of -ALL- OSPF routers.");
"Verify correct operation of -ALL- OSPF routers.");
DISCARD_LSA(lsa, 0); DISCARD_LSA(lsa, 0);
} }
@ -2032,8 +2020,7 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
if (current == NULL) { if (current == NULL) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"LSA[%s]: Previously originated Opaque-LSA," "LSA[%s]: Previously originated Opaque-LSA,not found in the LSDB.",
"not found in the LSDB.",
dump_lsa_key(lsa)); dump_lsa_key(lsa));
SET_FLAG(lsa->flags, OSPF_LSA_SELF); SET_FLAG(lsa->flags, OSPF_LSA_SELF);
@ -2254,8 +2241,7 @@ static void ospf_ls_ack(struct ip *iph, struct ospf_header *ospfh,
if (nbr->state < NSM_Exchange) { if (nbr->state < NSM_Exchange) {
if (IS_DEBUG_OSPF(nsm, NSM_EVENTS)) if (IS_DEBUG_OSPF(nsm, NSM_EVENTS))
zlog_debug( zlog_debug(
"Link State Acknowledgment: " "Link State Acknowledgment: Neighbor[%s] state %s is less than Exchange",
"Neighbor[%s] state %s is less than Exchange",
inet_ntoa(ospfh->router_id), inet_ntoa(ospfh->router_id),
lookup_msg(ospf_nsm_state_msg, nbr->state, lookup_msg(ospf_nsm_state_msg, nbr->state,
NULL)); NULL));
@ -2322,8 +2308,7 @@ static struct stream *ospf_recv_packet(struct ospf *ospf, int fd,
if ((unsigned int)ret < sizeof(struct ip)) { if ((unsigned int)ret < sizeof(struct ip)) {
flog_warn( flog_warn(
EC_OSPF_PACKET, EC_OSPF_PACKET,
"ospf_recv_packet: discarding runt packet of length %d " "ospf_recv_packet: discarding runt packet of length %d (ip header size is %u)",
"(ip header size is %u)",
ret, (unsigned int)sizeof(iph)); ret, (unsigned int)sizeof(iph));
return NULL; return NULL;
} }
@ -2369,8 +2354,7 @@ static struct stream *ospf_recv_packet(struct ospf *ospf, int fd,
if (ret != ip_len) { if (ret != ip_len) {
flog_warn( flog_warn(
EC_OSPF_PACKET, EC_OSPF_PACKET,
"ospf_recv_packet read length mismatch: ip_len is %d, " "ospf_recv_packet read length mismatch: ip_len is %d, but recvmsg returned %d",
"but recvmsg returned %d",
ip_len, ret); ip_len, ret);
return NULL; return NULL;
} }
@ -3141,8 +3125,7 @@ static enum ospf_read_return_enum ospf_read_helper(struct ospf *ospf)
if (ret < 0) { if (ret < 0) {
if (IS_DEBUG_OSPF_PACKET(0, RECV)) if (IS_DEBUG_OSPF_PACKET(0, RECV))
zlog_debug( zlog_debug(
"ospf_read[%s]: Header check failed, " "ospf_read[%s]: Header check failed, dropping.",
"dropping.",
inet_ntoa(iph->ip_src)); inet_ntoa(iph->ip_src));
return OSPF_READ_CONTINUE; return OSPF_READ_CONTINUE;
} }
@ -3992,17 +3975,13 @@ static struct ospf_packet *ospf_ls_upd_packet_new(struct list *update,
if (!warned) { if (!warned) {
flog_warn( flog_warn(
EC_OSPF_LARGE_LSA, EC_OSPF_LARGE_LSA,
"ospf_ls_upd_packet_new: oversized LSA encountered!" "ospf_ls_upd_packet_new: oversized LSA encountered!will need to fragment. Not optimal. Try divide up your network with areas. Use 'debug ospf packet send' to see details, or look at 'show ip ospf database ..'");
"will need to fragment. Not optimal. Try divide up"
" your network with areas. Use 'debug ospf packet send'"
" to see details, or look at 'show ip ospf database ..'");
warned = 1; warned = 1;
} }
if (IS_DEBUG_OSPF_PACKET(0, SEND)) if (IS_DEBUG_OSPF_PACKET(0, SEND))
zlog_debug( zlog_debug(
"ospf_ls_upd_packet_new: oversized LSA id:%s," "ospf_ls_upd_packet_new: oversized LSA id:%s, %d bytes originated by %s, will be fragmented!",
" %d bytes originated by %s, will be fragmented!",
inet_ntoa(lsa->data->id), inet_ntoa(lsa->data->id),
ntohs(lsa->data->length), ntohs(lsa->data->length),
inet_ntoa(lsa->data->adv_router)); inet_ntoa(lsa->data->adv_router));
@ -4020,9 +3999,7 @@ static struct ospf_packet *ospf_ls_upd_packet_new(struct list *update,
if (size > OSPF_MAX_PACKET_SIZE) { if (size > OSPF_MAX_PACKET_SIZE) {
flog_warn(EC_OSPF_LARGE_LSA, flog_warn(EC_OSPF_LARGE_LSA,
"ospf_ls_upd_packet_new: oversized LSA id:%s too big," "ospf_ls_upd_packet_new: oversized LSA id:%s too big, %d bytes, packet size %ld, dropping it completely. OSPF routing is broken!",
" %d bytes, packet size %ld, dropping it completely."
" OSPF routing is broken!",
inet_ntoa(lsa->data->id), ntohs(lsa->data->length), inet_ntoa(lsa->data->id), ntohs(lsa->data->length),
(long int)size); (long int)size);
list_delete_node(update, ln); list_delete_node(update, ln);
@ -4153,8 +4130,7 @@ static int ospf_ls_upd_send_queue_event(struct thread *thread)
if (again != 0) { if (again != 0) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_ls_upd_send_queue: update lists not cleared," "ospf_ls_upd_send_queue: update lists not cleared, %d nodes to try again, raising new event",
" %d nodes to try again, raising new event",
again); again);
oi->t_ls_upd_event = NULL; oi->t_ls_upd_event = NULL;
thread_add_event(master, ospf_ls_upd_send_queue_event, oi, 0, thread_add_event(master, ospf_ls_upd_send_queue_event, oi, 0,

View file

@ -322,8 +322,7 @@ void ospf_intra_add_router(struct route_table *rt, struct vertex *v,
if (!IS_ROUTER_LSA_BORDER(lsa) && !IS_ROUTER_LSA_EXTERNAL(lsa)) { if (!IS_ROUTER_LSA_BORDER(lsa) && !IS_ROUTER_LSA_EXTERNAL(lsa)) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_intra_add_router: " "ospf_intra_add_router: this router is neither ASBR nor ABR, skipping it");
"this router is neither ASBR nor ABR, skipping it");
return; return;
} }
@ -506,8 +505,7 @@ void ospf_intra_add_stub(struct route_table *rt, struct router_lsa_link *link,
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_intra_add_stub(): " "ospf_intra_add_stub(): another route to the same prefix found with cost %u",
"another route to the same prefix found with cost %u",
cur_or->cost); cur_or->cost);
/* Compare this distance to the current best cost to the stub /* Compare this distance to the current best cost to the stub
@ -923,16 +921,14 @@ int ospf_add_discard_route(struct ospf *ospf, struct route_table *rt,
if (or->path_type == OSPF_PATH_INTRA_AREA) { if (or->path_type == OSPF_PATH_INTRA_AREA) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_add_discard_route(): " "ospf_add_discard_route(): an intra-area route exists");
"an intra-area route exists");
return 0; return 0;
} }
if (or->type == OSPF_DESTINATION_DISCARD) { if (or->type == OSPF_DESTINATION_DISCARD) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_add_discard_route(): " "ospf_add_discard_route(): discard entry already installed");
"discard entry already installed");
return 0; return 0;
} }
@ -941,8 +937,7 @@ int ospf_add_discard_route(struct ospf *ospf, struct route_table *rt,
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_add_discard_route(): " "ospf_add_discard_route(): adding %s/%d",
"adding %s/%d",
inet_ntoa(p->prefix), p->prefixlen); inet_ntoa(p->prefix), p->prefixlen);
new_or = ospf_route_new(); new_or = ospf_route_new();
@ -967,8 +962,7 @@ void ospf_delete_discard_route(struct ospf *ospf, struct route_table *rt,
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_delete_discard_route(): " "ospf_delete_discard_route(): deleting %s/%d",
"deleting %s/%d",
inet_ntoa(p->prefix), p->prefixlen); inet_ntoa(p->prefix), p->prefixlen);
rn = route_node_lookup(rt, (struct prefix *)p); rn = route_node_lookup(rt, (struct prefix *)p);
@ -985,16 +979,14 @@ void ospf_delete_discard_route(struct ospf *ospf, struct route_table *rt,
if (or->path_type == OSPF_PATH_INTRA_AREA) { if (or->path_type == OSPF_PATH_INTRA_AREA) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_delete_discard_route(): " "ospf_delete_discard_route(): an intra-area route exists");
"an intra-area route exists");
return; return;
} }
if (or->type != OSPF_DESTINATION_DISCARD) { if (or->type != OSPF_DESTINATION_DISCARD) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_delete_discard_route(): " "ospf_delete_discard_route(): not a discard entry");
"not a discard entry");
return; return;
} }

View file

@ -540,8 +540,7 @@ static unsigned int ospf_nexthop_calculation(struct ospf_area *area,
if (IS_DEBUG_OSPF_EVENT) { if (IS_DEBUG_OSPF_EVENT) {
zlog_debug( zlog_debug(
"%s: considering link:%s " "%s: considering link:%s type:%d link_id:%s link_data:%s",
"type:%d link_id:%s link_data:%s",
__func__, oi->ifp->name, l->m[0].type, __func__, oi->ifp->name, l->m[0].type,
inet_ntop(AF_INET, &l->link_id, buf1, BUFSIZ), inet_ntop(AF_INET, &l->link_id, buf1, BUFSIZ),
inet_ntop(AF_INET, &l->link_data, buf2, inet_ntop(AF_INET, &l->link_data, buf2,
@ -676,8 +675,7 @@ static unsigned int ospf_nexthop_calculation(struct ospf_area *area,
return 1; return 1;
} else } else
zlog_info( zlog_info(
"ospf_nexthop_calculation(): " "ospf_nexthop_calculation(): vl_data for VL link not found");
"vl_data for VL link not found");
} /* end virtual-link from V to W */ } /* end virtual-link from V to W */
return 0; return 0;
} /* end W is a Router vertex */ } /* end W is a Router vertex */
@ -1183,8 +1181,7 @@ static void ospf_spf_calculate(struct ospf *ospf, struct ospf_area *area,
if (!area->router_lsa_self) { if (!area->router_lsa_self) {
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_spf_calculate: " "ospf_spf_calculate: Skip area %s's calculation due to empty router_lsa_self",
"Skip area %s's calculation due to empty router_lsa_self",
inet_ntoa(area->area_id)); inet_ntoa(area->area_id));
return; return;
} }

View file

@ -1022,8 +1022,7 @@ void ospf_sr_ri_lsa_update(struct ospf_lsa *lsa)
if ((srn != NULL) && (srn->instance != 0) if ((srn != NULL) && (srn->instance != 0)
&& (srn->instance != ntohl(lsah->id.s_addr))) { && (srn->instance != ntohl(lsah->id.s_addr))) {
flog_err(EC_OSPF_SR_INVALID_LSA_ID, flog_err(EC_OSPF_SR_INVALID_LSA_ID,
"SR (%s): Abort! Wrong " "SR (%s): Abort! Wrong LSA ID 4.0.0.%u for SR node %pI4/%u",
"LSA ID 4.0.0.%u for SR node %pI4/%u",
__func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)), __func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)),
&lsah->adv_router, srn->instance); &lsah->adv_router, srn->instance);
return; return;
@ -1638,8 +1637,7 @@ void ospf_sr_config_write_router(struct vty *vty)
for (ALL_LIST_ELEMENTS_RO(OspfSR.self->ext_prefix, node, for (ALL_LIST_ELEMENTS_RO(OspfSR.self->ext_prefix, node,
srp)) { srp)) {
vty_out(vty, vty_out(vty,
" segment-routing prefix %s/%u " " segment-routing prefix %s/%u index %u%s\n",
"index %u%s\n",
inet_ntoa(srp->prefv4.prefix), inet_ntoa(srp->prefv4.prefix),
srp->prefv4.prefixlen, srp->sid, srp->prefv4.prefixlen, srp->sid,
CHECK_FLAG(srp->flags, CHECK_FLAG(srp->flags,
@ -1665,8 +1663,7 @@ DEFUN(ospf_sr_enable,
if (ospf->vrf_id != VRF_DEFAULT) { if (ospf->vrf_id != VRF_DEFAULT) {
vty_out(vty, vty_out(vty,
"Segment Routing is only supported in default " "Segment Routing is only supported in default VRF\n");
"VRF\n");
return CMD_WARNING_CONFIG_FAILED; return CMD_WARNING_CONFIG_FAILED;
} }
@ -1954,8 +1951,7 @@ DEFUN (sr_prefix_sid,
*/ */
listnode_add(OspfSR.self->ext_prefix, new); listnode_add(OspfSR.self->ext_prefix, new);
zlog_info( zlog_info(
"Interface for prefix %pFX not found. Deferred LSA " "Interface for prefix %pFX not found. Deferred LSA flooding",
"flooding",
&p); &p);
return CMD_SUCCESS; return CMD_SUCCESS;
} }
@ -2245,11 +2241,9 @@ static void show_sr_node(struct vty *vty, struct json_object *json,
if (!json) { if (!json) {
sbuf_push(&sbuf, 0, sbuf_push(&sbuf, 0,
"\n\n Prefix or Link Node or Adj. SID " "\n\n Prefix or Link Node or Adj. SID Label Operation Interface Nexthop\n");
" Label Operation Interface Nexthop\n");
sbuf_push(&sbuf, 0, sbuf_push(&sbuf, 0,
"------------------ --------------------- " "------------------ --------------------- -------------------- --------- ---------------\n");
"-------------------- --------- ---------------\n");
} }
for (ALL_LIST_ELEMENTS_RO(srn->ext_prefix, node, srp)) { for (ALL_LIST_ELEMENTS_RO(srn->ext_prefix, node, srp)) {
if (json) { if (json) {

View file

@ -313,8 +313,7 @@ DEFPY (ospf_router_id,
for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area))
if (area->full_nbrs) { if (area->full_nbrs) {
vty_out(vty, vty_out(vty,
"For this router-id change to take effect," "For this router-id change to take effect, save config and restart ospfd\n");
" save config and restart ospfd\n");
return CMD_SUCCESS; return CMD_SUCCESS;
} }
@ -347,8 +346,7 @@ DEFUN_HIDDEN (ospf_router_id_old,
for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area))
if (area->full_nbrs) { if (area->full_nbrs) {
vty_out(vty, vty_out(vty,
"For this router-id change to take effect," "For this router-id change to take effect, save config and restart ospfd\n");
" save config and restart ospfd\n");
return CMD_SUCCESS; return CMD_SUCCESS;
} }
@ -381,8 +379,7 @@ DEFPY (no_ospf_router_id,
for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area))
if (area->full_nbrs) { if (area->full_nbrs) {
vty_out(vty, vty_out(vty,
"For this router-id change to take effect," "For this router-id change to take effect, save config and restart ospfd\n");
" save config and restart ospfd\n");
return CMD_SUCCESS; return CMD_SUCCESS;
} }
@ -1385,8 +1382,7 @@ DEFUN (ospf_area_shortcut,
if (ospf->abr_type != OSPF_ABR_SHORTCUT) if (ospf->abr_type != OSPF_ABR_SHORTCUT)
vty_out(vty, vty_out(vty,
"Shortcut area setting will take effect " "Shortcut area setting will take effect only when the router is configured as Shortcut ABR\n");
"only when the router is configured as Shortcut ABR\n");
return CMD_SUCCESS; return CMD_SUCCESS;
} }
@ -1718,8 +1714,7 @@ DEFUN (ospf_area_default_cost,
p.prefixlen = 0; p.prefixlen = 0;
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_stub_defaults(): " "ospf_abr_announce_stub_defaults(): announcing 0.0.0.0/0 to area %s",
"announcing 0.0.0.0/0 to area %s",
inet_ntoa(area->area_id)); inet_ntoa(area->area_id));
ospf_abr_announce_network_to_area(&p, area->default_cost, area); ospf_abr_announce_network_to_area(&p, area->default_cost, area);
@ -1762,8 +1757,7 @@ DEFUN (no_ospf_area_default_cost,
p.prefixlen = 0; p.prefixlen = 0;
if (IS_DEBUG_OSPF_EVENT) if (IS_DEBUG_OSPF_EVENT)
zlog_debug( zlog_debug(
"ospf_abr_announce_stub_defaults(): " "ospf_abr_announce_stub_defaults(): announcing 0.0.0.0/0 to area %s",
"announcing 0.0.0.0/0 to area %s",
inet_ntoa(area->area_id)); inet_ntoa(area->area_id));
ospf_abr_announce_network_to_area(&p, area->default_cost, area); ospf_abr_announce_network_to_area(&p, area->default_cost, area);
@ -2712,8 +2706,7 @@ static void show_ip_ospf_area(struct vty *vty, struct ospf_area *area,
area->act_ints); area->act_ints);
} else } else
vty_out(vty, vty_out(vty,
" Number of interfaces in this area: Total: %d, " " Number of interfaces in this area: Total: %d, Active: %d\n",
"Active: %d\n",
listcount(area->oiflist), area->act_ints); listcount(area->oiflist), area->act_ints);
if (area->external_routing == OSPF_AREA_NSSA) { if (area->external_routing == OSPF_AREA_NSSA) {
@ -2871,8 +2864,7 @@ static void show_ip_ospf_area(struct vty *vty, struct ospf_area *area,
} else { } else {
/* Show number of fully adjacent neighbors. */ /* Show number of fully adjacent neighbors. */
vty_out(vty, vty_out(vty,
" Number of fully adjacent neighbors in this area:" " Number of fully adjacent neighbors in this area: %d\n",
" %d\n",
area->full_nbrs); area->full_nbrs);
/* Show authentication type. */ /* Show authentication type. */
@ -2886,8 +2878,7 @@ static void show_ip_ospf_area(struct vty *vty, struct ospf_area *area,
if (!OSPF_IS_AREA_BACKBONE(area)) if (!OSPF_IS_AREA_BACKBONE(area))
vty_out(vty, vty_out(vty,
" Number of full virtual adjacencies going through" " Number of full virtual adjacencies going through this area: %d\n",
" this area: %d\n",
area->full_vls); area->full_vls);
/* Show SPF calculation times. */ /* Show SPF calculation times. */
@ -3173,8 +3164,7 @@ static int show_ip_ospf_common(struct vty *vty, struct ospf *ospf,
"injectingExternalRoutingInformation"); "injectingExternalRoutingInformation");
else else
vty_out(vty, vty_out(vty,
" This router is an ASBR " " This router is an ASBR (injecting external routing information)\n");
"(injecting external routing information)\n");
} }
/* Show Number of AS-external-LSAs. */ /* Show Number of AS-external-LSAs. */
@ -10205,8 +10195,7 @@ static int config_write_virtual_link(struct vty *vty, struct ospf *ospf)
->auth_crypt, ->auth_crypt,
n2, ck)) n2, ck))
vty_out(vty, vty_out(vty,
" area %s virtual-link %s" " area %s virtual-link %s message-digest-key %d md5 %s\n",
" message-digest-key %d md5 %s\n",
buf, inet_ntoa(vl_data->vl_peer), buf, inet_ntoa(vl_data->vl_peer),
ck->key_id, ck->auth_key); ck->key_id, ck->auth_key);
} }
@ -10385,8 +10374,7 @@ static int ospf_config_write_one(struct vty *vty, struct ospf *ospf)
/* auto-cost reference-bandwidth configuration. */ /* auto-cost reference-bandwidth configuration. */
if (ospf->ref_bandwidth != OSPF_DEFAULT_REF_BANDWIDTH) { if (ospf->ref_bandwidth != OSPF_DEFAULT_REF_BANDWIDTH) {
vty_out(vty, vty_out(vty,
"! Important: ensure reference bandwidth " "! Important: ensure reference bandwidth is consistent across all routers\n");
"is consistent across all routers\n");
vty_out(vty, " auto-cost reference-bandwidth %d\n", vty_out(vty, " auto-cost reference-bandwidth %d\n",
ospf->ref_bandwidth); ospf->ref_bandwidth);
} }

View file

@ -770,8 +770,7 @@ static int ospf_external_lsa_originate_check(struct ospf *ospf,
/* If prefix is multicast, then do not originate LSA. */ /* If prefix is multicast, then do not originate LSA. */
if (IN_MULTICAST(htonl(ei->p.prefix.s_addr))) { if (IN_MULTICAST(htonl(ei->p.prefix.s_addr))) {
zlog_info( zlog_info(
"LSA[Type5:%s]: Not originate AS-external-LSA, " "LSA[Type5:%s]: Not originate AS-external-LSA, Prefix belongs multicast",
"Prefix belongs multicast",
inet_ntoa(ei->p.prefix)); inet_ntoa(ei->p.prefix));
return 0; return 0;
} }
@ -780,8 +779,7 @@ static int ospf_external_lsa_originate_check(struct ospf *ospf,
if (is_prefix_default(&ei->p)) if (is_prefix_default(&ei->p))
if (ospf->default_originate == DEFAULT_ORIGINATE_NONE) { if (ospf->default_originate == DEFAULT_ORIGINATE_NONE) {
zlog_info( zlog_info(
"LSA[Type5:0.0.0.0]: Not originate AS-external-LSA " "LSA[Type5:0.0.0.0]: Not originate AS-external-LSA for default");
"for default");
return 0; return 0;
} }

View file

@ -4979,8 +4979,7 @@ static void pim_show_mlag_help_string(struct vty *vty, bool uj)
if (!uj) { if (!uj) {
vty_out(vty, "Owner codes:\n"); vty_out(vty, "Owner codes:\n");
vty_out(vty, vty_out(vty,
"L: EVPN-MLAG Entry, I:PIM-MLAG Entry, " "L: EVPN-MLAG Entry, I:PIM-MLAG Entry, P: Peer Entry\n");
"P: Peer Entry\n");
} }
} }
@ -8404,8 +8403,7 @@ DEFUN_HIDDEN (interface_ip_pim_ssm,
} }
vty_out(vty, vty_out(vty,
"WARN: Enabled PIM SM on interface; configure PIM SSM " "WARN: Enabled PIM SM on interface; configure PIM SSM range if needed\n");
"range if needed\n");
return CMD_SUCCESS; return CMD_SUCCESS;
} }

View file

@ -139,8 +139,7 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch)
if (PIM_I_am_DualActive(pim_ifp)) { if (PIM_I_am_DualActive(pim_ifp)) {
if (PIM_DEBUG_MLAG) if (PIM_DEBUG_MLAG)
zlog_debug( zlog_debug(
"%s: if-chnanel-%s is deleted from a Dual " "%s: if-chnanel-%s is deleted from a Dual active Interface",
"active Interface",
__func__, ch->sg_str); __func__, ch->sg_str);
/* Post Delete only if it is the last Dual-active Interface */ /* Post Delete only if it is the last Dual-active Interface */
if (ch->upstream->dualactive_ifchannel_count == 1) { if (ch->upstream->dualactive_ifchannel_count == 1) {
@ -214,8 +213,7 @@ void pim_ifchannel_delete(struct pim_ifchannel *ch)
else { else {
if (PIM_DEBUG_PIM_TRACE) if (PIM_DEBUG_PIM_TRACE)
zlog_debug( zlog_debug(
"%s: Avoiding deletion of upstream with ref_count %d " "%s: Avoiding deletion of upstream with ref_count %d from ifchannel(%s): %s",
"from ifchannel(%s): %s",
__func__, ch->upstream->ref_count, __func__, ch->upstream->ref_count,
ch->interface->name, ch->sg_str); ch->interface->name, ch->sg_str);
} }
@ -622,8 +620,7 @@ struct pim_ifchannel *pim_ifchannel_add(struct interface *ifp,
} }
if (PIM_DEBUG_MLAG) if (PIM_DEBUG_MLAG)
zlog_debug( zlog_debug(
"%s: New Dual active if-chnanel is added to upstream:%s " "%s: New Dual active if-chnanel is added to upstream:%s count:%d, flags:0x%x",
"count:%d, flags:0x%x",
__func__, up->sg_str, __func__, up->sg_str,
up->dualactive_ifchannel_count, up->flags); up->dualactive_ifchannel_count, up->flags);
} }

View file

@ -351,9 +351,7 @@ static int igmp_recv_query(struct igmp_sock *igmp, int query_version,
*/ */
if (query_version != pim_ifp->igmp_version) { if (query_version != pim_ifp->igmp_version) {
zlog_warn( zlog_warn(
"Recv IGMP query v%d from %s on %s but we are using v%d, please " "Recv IGMP query v%d from %s on %s but we are using v%d, please configure all PIM routers on this subnet to use the same IGMP version",
"configure all PIM routers on this subnet to use the same "
"IGMP version",
query_version, from_str, ifp->name, query_version, from_str, ifp->name,
pim_ifp->igmp_version); pim_ifp->igmp_version);
return 0; return 0;

View file

@ -231,9 +231,7 @@ static void mtrace_debug(struct pim_interface *pim_ifp,
ra = mtracep->rsp_addr; ra = mtracep->rsp_addr;
zlog_debug( zlog_debug(
"Rx mtrace packet incoming on %s: " "Rx mtrace packet incoming on %s: hops=%d type=%d size=%d, grp=%s, src=%s, dst=%s rsp=%s ttl=%d qid=%ud",
"hops=%d type=%d size=%d, grp=%s, src=%s,"
" dst=%s rsp=%s ttl=%d qid=%ud",
inet_ntop(AF_INET, &(pim_ifp->primary_address), inc_str, inet_ntop(AF_INET, &(pim_ifp->primary_address), inc_str,
sizeof(inc_str)), sizeof(inc_str)),
mtracep->hops, mtracep->type, mtrace_len, mtracep->hops, mtracep->type, mtrace_len,
@ -255,8 +253,7 @@ static void mtrace_debug(struct pim_interface *pim_ifp,
if ((responses % sizeof(struct igmp_mtrace_rsp)) != 0) if ((responses % sizeof(struct igmp_mtrace_rsp)) != 0)
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_debug( zlog_debug(
"Mtrace response block of wrong" "Mtrace response block of wrong length");
" length");
responses = responses / sizeof(struct igmp_mtrace_rsp); responses = responses / sizeof(struct igmp_mtrace_rsp);
@ -358,17 +355,14 @@ static int mtrace_send_packet(struct interface *ifp,
if (sent < 0) { if (sent < 0) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Send mtrace request failed for %s on" "Send mtrace request failed for %s on%s: group=%s msg_size=%zd: errno=%d: %s",
"%s: group=%s msg_size=%zd: errno=%d: "
" %s",
dst_str, ifp->name, group_str, dst_str, ifp->name, group_str,
mtrace_buf_len, errno, mtrace_buf_len, errno,
safe_strerror(errno)); safe_strerror(errno));
} else { } else {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Send mtrace request failed for %s on" "Send mtrace request failed for %s on %s: group=%s msg_size=%zd: sent=%zd",
" %s: group=%s msg_size=%zd: sent=%zd",
dst_str, ifp->name, group_str, dst_str, ifp->name, group_str,
mtrace_buf_len, sent); mtrace_buf_len, sent);
} }
@ -418,8 +412,7 @@ static int mtrace_un_forward_packet(struct pim_instance *pim, struct ip *ip_hdr,
close(fd); close(fd);
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Dropping mtrace packet, " "Dropping mtrace packet, no route to destination");
"no route to destination");
return -1; return -1;
} }
@ -448,8 +441,7 @@ static int mtrace_un_forward_packet(struct pim_instance *pim, struct ip *ip_hdr,
if (sent < 0) { if (sent < 0) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Failed to forward mtrace packet:" "Failed to forward mtrace packet: sendto errno=%d, %s",
" sendto errno=%d, %s",
errno, safe_strerror(errno)); errno, safe_strerror(errno));
return -1; return -1;
} }
@ -480,8 +472,7 @@ static int mtrace_mc_forward_packet(struct pim_instance *pim, struct ip *ip_hdr)
if (c_oil == NULL) { if (c_oil == NULL) {
if (PIM_DEBUG_MTRACE) { if (PIM_DEBUG_MTRACE) {
zlog_debug( zlog_debug(
"Dropping mtrace multicast packet " "Dropping mtrace multicast packet len=%u to %s ttl=%u",
"len=%u to %s ttl=%u",
ntohs(ip_hdr->ip_len), ntohs(ip_hdr->ip_len),
inet_ntoa(ip_hdr->ip_dst), ip_hdr->ip_ttl); inet_ntoa(ip_hdr->ip_dst), ip_hdr->ip_ttl);
} }
@ -532,8 +523,7 @@ static int mtrace_send_mc_response(struct pim_instance *pim,
if (c_oil == NULL) { if (c_oil == NULL) {
if (PIM_DEBUG_MTRACE) { if (PIM_DEBUG_MTRACE) {
zlog_debug( zlog_debug(
"Dropping mtrace multicast response packet " "Dropping mtrace multicast response packet len=%u to %s",
"len=%u to %s",
(unsigned int)mtrace_len, (unsigned int)mtrace_len,
inet_ntoa(mtracep->rsp_addr)); inet_ntoa(mtracep->rsp_addr));
} }
@ -595,8 +585,7 @@ static int mtrace_send_response(struct pim_instance *pim,
if (!pim_nexthop_lookup(pim, &nexthop, mtracep->rsp_addr, 1)) { if (!pim_nexthop_lookup(pim, &nexthop, mtracep->rsp_addr, 1)) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Dropped response qid=%ud, no route to " "Dropped response qid=%ud, no route to response address",
"response address",
mtracep->qry_id); mtracep->qry_id);
return -1; return -1;
} }
@ -645,8 +634,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
if (igmp_msg_len < (int)sizeof(struct igmp_mtrace)) { if (igmp_msg_len < (int)sizeof(struct igmp_mtrace)) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Recv mtrace packet from %s on %s: too short," "Recv mtrace packet from %s on %s: too short, len=%d, min=%zu",
" len=%d, min=%zu",
from_str, ifp->name, igmp_msg_len, from_str, ifp->name, igmp_msg_len,
sizeof(struct igmp_mtrace)); sizeof(struct igmp_mtrace));
return -1; return -1;
@ -663,8 +651,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
if (recv_checksum != checksum) { if (recv_checksum != checksum) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Recv mtrace packet from %s on %s: checksum" "Recv mtrace packet from %s on %s: checksum mismatch: received=%x computed=%x",
" mismatch: received=%x computed=%x",
from_str, ifp->name, recv_checksum, checksum); from_str, ifp->name, recv_checksum, checksum);
return -1; return -1;
} }
@ -688,8 +675,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
if (IPV4_CLASS_DE(ntohl(ip_hdr->ip_dst.s_addr))) { if (IPV4_CLASS_DE(ntohl(ip_hdr->ip_dst.s_addr))) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_debug( zlog_debug(
"Dropping multicast query " "Dropping multicast query on wrong interface");
"on wrong interface");
return -1; return -1;
} }
/* Unicast query on wrong interface */ /* Unicast query on wrong interface */
@ -700,8 +686,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
if (qry_id == mtracep->qry_id && qry_src == from.s_addr) { if (qry_id == mtracep->qry_id && qry_src == from.s_addr) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_debug( zlog_debug(
"Dropping multicast query with " "Dropping multicast query with duplicate source and id");
"duplicate source and id");
return -1; return -1;
} }
qry_id = mtracep->qry_id; qry_id = mtracep->qry_id;
@ -721,8 +706,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
} else { } else {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Recv mtrace packet from %s on %s: " "Recv mtrace packet from %s on %s: invalid length %d",
"invalid length %d",
from_str, ifp->name, igmp_msg_len); from_str, ifp->name, igmp_msg_len);
return -1; return -1;
} }
@ -732,8 +716,7 @@ int igmp_mtrace_recv_qry_req(struct igmp_sock *igmp, struct ip *ip_hdr,
&& !IPV4_MC_LINKLOCAL(ntohl(ip_hdr->ip_dst.s_addr))) { && !IPV4_MC_LINKLOCAL(ntohl(ip_hdr->ip_dst.s_addr))) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Recv mtrace packet from %s on %s:" "Recv mtrace packet from %s on %s: not link-local multicast %s",
" not link-local multicast %s",
from_str, ifp->name, inet_ntoa(ip_hdr->ip_dst)); from_str, ifp->name, inet_ntoa(ip_hdr->ip_dst));
return -1; return -1;
} }
@ -866,8 +849,7 @@ int igmp_mtrace_recv_response(struct igmp_sock *igmp, struct ip *ip_hdr,
if (igmp_msg_len < (int)sizeof(struct igmp_mtrace)) { if (igmp_msg_len < (int)sizeof(struct igmp_mtrace)) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Recv mtrace packet from %s on %s: too short," "Recv mtrace packet from %s on %s: too short, len=%d, min=%zu",
" len=%d, min=%zu",
from_str, ifp->name, igmp_msg_len, from_str, ifp->name, igmp_msg_len,
sizeof(struct igmp_mtrace)); sizeof(struct igmp_mtrace));
return -1; return -1;
@ -884,8 +866,7 @@ int igmp_mtrace_recv_response(struct igmp_sock *igmp, struct ip *ip_hdr,
if (recv_checksum != checksum) { if (recv_checksum != checksum) {
if (PIM_DEBUG_MTRACE) if (PIM_DEBUG_MTRACE)
zlog_warn( zlog_warn(
"Recv mtrace response from %s on %s: checksum" "Recv mtrace response from %s on %s: checksum mismatch: received=%x computed=%x",
" mismatch: received=%x computed=%x",
from_str, ifp->name, recv_checksum, checksum); from_str, ifp->name, recv_checksum, checksum);
return -1; return -1;
} }

View file

@ -118,8 +118,7 @@ void rip_interface_multicast_set(int sock, struct connected *connected)
if (setsockopt_ipv4_multicast_if(sock, addr, connected->ifp->ifindex) if (setsockopt_ipv4_multicast_if(sock, addr, connected->ifp->ifindex)
< 0) { < 0) {
zlog_warn( zlog_warn(
"Can't setsockopt IP_MULTICAST_IF on fd %d to " "Can't setsockopt IP_MULTICAST_IF on fd %d to ifindex %d for interface %s",
"ifindex %d for interface %s",
sock, connected->ifp->ifindex, connected->ifp->name); sock, connected->ifp->ifindex, connected->ifp->name);
} }

View file

@ -742,8 +742,7 @@ static void rip_packet_dump(struct rip_packet *packet, int size,
ntohs(md5->family), ntohs(md5->family),
ntohs(md5->type)); ntohs(md5->type));
zlog_debug( zlog_debug(
" RIP-2 packet len %d Key ID %d" " RIP-2 packet len %d Key ID %d Auth Data len %d",
" Auth Data len %d",
ntohs(md5->packet_len), ntohs(md5->packet_len),
md5->keyid, md5->auth_len); md5->keyid, md5->auth_len);
zlog_debug(" Sequence Number %ld", zlog_debug(" Sequence Number %ld",
@ -757,8 +756,7 @@ static void rip_packet_dump(struct rip_packet *packet, int size,
ntohs(rte->family), ntohs(rte->family),
ntohs(rte->tag)); ntohs(rte->tag));
zlog_debug( zlog_debug(
" MD5: %02X%02X%02X%02X%02X%02X%02X%02X" " MD5: %02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
"%02X%02X%02X%02X%02X%02X%02X%02X",
p[0], p[1], p[2], p[3], p[4], p[0], p[1], p[2], p[3], p[4],
p[5], p[6], p[7], p[8], p[9], p[5], p[6], p[7], p[8], p[9],
p[10], p[11], p[12], p[13], p[10], p[11], p[12], p[13],
@ -904,8 +902,7 @@ static int rip_auth_md5(struct rip_packet *packet, struct sockaddr_in *from,
|| (md5->auth_len == RIP_AUTH_MD5_COMPAT_SIZE))) { || (md5->auth_len == RIP_AUTH_MD5_COMPAT_SIZE))) {
if (IS_RIP_DEBUG_EVENT) if (IS_RIP_DEBUG_EVENT)
zlog_debug( zlog_debug(
"RIPv2 MD5 authentication, strange authentication " "RIPv2 MD5 authentication, strange authentication length field %d",
"length field %d",
md5->auth_len); md5->auth_len);
return 0; return 0;
} }
@ -916,8 +913,7 @@ static int rip_auth_md5(struct rip_packet *packet, struct sockaddr_in *from,
if (packet_len > (length - RIP_HEADER_SIZE - RIP_AUTH_MD5_SIZE)) { if (packet_len > (length - RIP_HEADER_SIZE - RIP_AUTH_MD5_SIZE)) {
if (IS_RIP_DEBUG_EVENT) if (IS_RIP_DEBUG_EVENT)
zlog_debug( zlog_debug(
"RIPv2 MD5 authentication, packet length field %d " "RIPv2 MD5 authentication, packet length field %d greater than received length %d!",
"greater than received length %d!",
md5->packet_len, length); md5->packet_len, length);
return 0; return 0;
} }
@ -1645,8 +1641,7 @@ void rip_redistribute_delete(struct rip *rip, int type, int sub_type,
if (IS_RIP_DEBUG_EVENT) if (IS_RIP_DEBUG_EVENT)
zlog_debug( zlog_debug(
"Poison %s/%d on the interface %s with an " "Poison %s/%d on the interface %s with an infinity metric [delete]",
"infinity metric [delete]",
inet_ntoa(p->prefix), inet_ntoa(p->prefix),
p->prefixlen, p->prefixlen,
ifindex2ifname( ifindex2ifname(
@ -1814,8 +1809,7 @@ static int rip_read(struct thread *t)
if (ifc == NULL) { if (ifc == NULL) {
zlog_info( zlog_info(
"rip_read: cannot find connected address for packet from %s " "rip_read: cannot find connected address for packet from %s port %d on interface %s (VRF %s)",
"port %d on interface %s (VRF %s)",
inet_ntoa(from.sin_addr), ntohs(from.sin_port), inet_ntoa(from.sin_addr), ntohs(from.sin_port),
ifp->name, rip->vrf_name); ifp->name, rip->vrf_name);
return -1; return -1;
@ -1937,8 +1931,7 @@ static int rip_read(struct thread *t)
if (packet->command != RIP_REQUEST) { if (packet->command != RIP_REQUEST) {
if (IS_RIP_DEBUG_PACKET) if (IS_RIP_DEBUG_PACKET)
zlog_debug( zlog_debug(
"RIPv1" "RIPv1 dropped because authentication enabled");
" dropped because authentication enabled");
ripd_notif_send_auth_type_failure(ifp->name); ripd_notif_send_auth_type_failure(ifp->name);
rip_peer_bad_packet(rip, &from); rip_peer_bad_packet(rip, &from);
return -1; return -1;
@ -1961,8 +1954,7 @@ static int rip_read(struct thread *t)
if (packet->rte->family != htons(RIP_FAMILY_AUTH)) { if (packet->rte->family != htons(RIP_FAMILY_AUTH)) {
if (IS_RIP_DEBUG_PACKET) if (IS_RIP_DEBUG_PACKET)
zlog_debug( zlog_debug(
"RIPv2" "RIPv2 dropped because authentication enabled");
" dropped because authentication enabled");
ripd_notif_send_auth_type_failure(ifp->name); ripd_notif_send_auth_type_failure(ifp->name);
rip_peer_bad_packet(rip, &from); rip_peer_bad_packet(rip, &from);
return -1; return -1;

View file

@ -1047,8 +1047,7 @@ void ripng_redistribute_delete(struct ripng *ripng, int type, int sub_type,
if (IS_RIPNG_DEBUG_EVENT) if (IS_RIPNG_DEBUG_EVENT)
zlog_debug( zlog_debug(
"Poisone %s/%d on the interface %s with an " "Poisone %s/%d on the interface %s with an infinity metric [delete]",
"infinity metric [delete]",
inet6_ntoa(p->prefix), inet6_ntoa(p->prefix),
p->prefixlen, p->prefixlen,
ifindex2ifname( ifindex2ifname(

View file

@ -271,57 +271,9 @@ static struct test_segment {
0x03, 0xce, 0x01, 0x10, 0x00, 0x85, 0xed, 0x03, 0xce, 0x01, 0x10, 0x00, 0x85, 0xed,
}, },
502, 502,
{"8466 3 52737 4096 34285 8466 3 52737 4096 34285 " {"8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285",
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285",
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 " "8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285",
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285",
250, 0, NOT_ALL_PRIVATE, 4096, 4, 8466}, 250, 0, NOT_ALL_PRIVATE, 4096, 4, 8466},
}, },
{ {
@ -383,15 +335,13 @@ static struct test_segment {
{ {
/* 20 */ /* 20 */
"reconcile_confed", "reconcile_confed",
"confseq(123,456,789) confset(456,124,788) seq(6435,59408,21665)" "confseq(123,456,789) confset(456,124,788) seq(6435,59408,21665) set(23456,23456,23456), seq(23456,23456,23456)",
" set(23456,23456,23456), seq(23456,23456,23456)",
{0x3, 0x3, 0x00, 0x7b, 0x01, 0xc8, 0x03, 0x15, 0x4, 0x3, {0x3, 0x3, 0x00, 0x7b, 0x01, 0xc8, 0x03, 0x15, 0x4, 0x3,
0x01, 0xc8, 0x00, 0x7c, 0x03, 0x14, 0x2, 0x3, 0x19, 0x23, 0x01, 0xc8, 0x00, 0x7c, 0x03, 0x14, 0x2, 0x3, 0x19, 0x23,
0xe8, 0x10, 0x54, 0xa1, 0x1, 0x3, 0x5b, 0xa0, 0x5b, 0xa0, 0xe8, 0x10, 0x54, 0xa1, 0x1, 0x3, 0x5b, 0xa0, 0x5b, 0xa0,
0x5b, 0xa0, 0x2, 0x3, 0x5b, 0xa0, 0x5b, 0xa0, 0x5b, 0xa0}, 0x5b, 0xa0, 0x2, 0x3, 0x5b, 0xa0, 0x5b, 0xa0, 0x5b, 0xa0},
40, 40,
{"(123 456 789) [124,456,788] 6435 59408 21665" {"(123 456 789) [124,456,788] 6435 59408 21665 {23456} 23456 23456 23456",
" {23456} 23456 23456 23456",
"6435 59408 21665 {23456} 23456 23456 23456", 7, 4, "6435 59408 21665 {23456} 23456 23456 23456", 7, 4,
NOT_ALL_PRIVATE, 23456, 1, 6435}, NOT_ALL_PRIVATE, 23456, 1, 6435},
}, },
@ -739,10 +689,8 @@ static struct tests {
/* 3 */ /* 3 */
{&test_segments[4], {&test_segments[4],
&test_segments[5], &test_segments[5],
{"8467 59649 {4196,48658} {17322,30745} 6435 59408 21665" {"8467 59649 {4196,48658} {17322,30745} 6435 59408 21665 {2457,4369,61697} 1842 41590 51793",
" {2457,4369,61697} 1842 41590 51793", "8467 59649 {4196,48658} {17322,30745} 6435 59408 21665 {2457,4369,61697} 1842 41590 51793",
"8467 59649 {4196,48658} {17322,30745} 6435 59408 21665"
" {2457,4369,61697} 1842 41590 51793",
11, 0, NOT_ALL_PRIVATE, 61697, 1, 8467}}, 11, 0, NOT_ALL_PRIVATE, 61697, 1, 8467}},
/* 4 */ /* 4 */
{ {
@ -777,59 +725,9 @@ static struct tests {
{ {
&test_segments[14], &test_segments[14],
&test_segments[11], &test_segments[11],
{"8466 3 52737 4096 34285 8466 3 52737 4096 34285 " {"8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 2 52737 4096 8722 4 8722",
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 2 52737 4096 8722 4 8722",
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 " "8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 3 52737 4096 34285 8466 2 52737 4096 8722 4 8722",
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 3 52737 4096 34285 8466 3 52737 4096 34285 "
"8466 2 52737 4096 8722 4 8722",
257, 0, NOT_ALL_PRIVATE, 4096, 1000, 8466}, 257, 0, NOT_ALL_PRIVATE, 4096, 1000, 8466},
}, },
{NULL, {NULL,
@ -861,8 +759,7 @@ struct tests reconcile_tests[] = {
{ {
&test_segments[20], &test_segments[20],
&test_segments[19], &test_segments[19],
{"(123 456 789) [124,456,788] 6435 59408 21665" {"(123 456 789) [124,456,788] 6435 59408 21665 {2457,4369,61697} 1842 41591 51793",
" {2457,4369,61697} 1842 41591 51793",
"6435 59408 21665 {2457,4369,61697} 1842 41591 51793", 7, 4, "6435 59408 21665 {2457,4369,61697} 1842 41591 51793", 7, 4,
NOT_ALL_PRIVATE, 51793, 1, 6435}, NOT_ALL_PRIVATE, 51793, 1, 6435},
}, },

View file

@ -489,8 +489,7 @@ int main(int argc, char **argv)
in_csum_res = in_cksum_optimized(buffer, exercise); in_csum_res = in_cksum_optimized(buffer, exercise);
in_csum_rfc = in_cksum_rfc(buffer, exercise); in_csum_rfc = in_cksum_rfc(buffer, exercise);
if (in_csum_res != in_csum || in_csum != in_csum_rfc) if (in_csum_res != in_csum || in_csum != in_csum_rfc)
printf("verify: in_chksum failed in_csum:%x, in_csum_res:%x," printf("verify: in_chksum failed in_csum:%x, in_csum_res:%x,in_csum_rfc %x, len:%d\n",
"in_csum_rfc %x, len:%d\n",
in_csum, in_csum_res, in_csum_rfc, exercise); in_csum, in_csum_res, in_csum_rfc, exercise);
ospfd = ospfd_checksum(buffer, exercise + sizeof(uint16_t), ospfd = ospfd_checksum(buffer, exercise + sizeof(uint16_t),

View file

@ -93,8 +93,7 @@ int main(int argc, char **argv)
/* add bigger row */ /* add bigger row */
ttable_add_row(tt, "%s|%s||%s|%s", ttable_add_row(tt, "%s|%s||%s|%s",
"nebula dusk session streets twilight " "nebula dusk session streets twilight pioneer beats yeah",
"pioneer beats yeah",
"prarie dog", "cornmeal", ":O -*_-*"); "prarie dog", "cornmeal", ":O -*_-*");
assert(tt->ncols == 5); assert(tt->ncols == 5);
assert(tt->nrows == 2); assert(tt->nrows == 2);

View file

@ -268,8 +268,7 @@ check_format_string (tree fntype, unsigned HOST_WIDE_INT format_num,
/* We expect a string object type as the format arg. */ /* We expect a string object type as the format arg. */
if (is_char_ref) if (is_char_ref)
{ {
error ("format argument should be a %qs reference but" error ("format argument should be a %qs reference but a string was found", format_name (expected_format_type));
" a string was found", format_name (expected_format_type));
*no_add_attrs = true; *no_add_attrs = true;
return false; return false;
} }
@ -741,8 +740,7 @@ check_function_format (tree attrs, int nargs, tree *argarray,
break; break;
} }
if (args != 0) if (args != 0)
warning (OPT_Wsuggest_attribute_format, "function %qD " warning (OPT_Wsuggest_attribute_format, "function %qD might be a candidate for %qs frr_format attribute",
"might be a candidate for %qs frr_format attribute",
current_function_decl, current_function_decl,
format_types[info.format_type].name); format_types[info.format_type].name);
} }
@ -1534,8 +1532,7 @@ flag_chars_t::validate (const format_kind_info *fki,
: s->long_name); : s->long_name);
if (ADJ_STD (t->std) > C_STD_VER) if (ADJ_STD (t->std) > C_STD_VER)
warning_at (format_string_loc, OPT_Wformat_, warning_at (format_string_loc, OPT_Wformat_,
"%s does not support %s with" "%s does not support %s with the %<%%%c%> %s format",
" the %<%%%c%> %s format",
C_STD_NAME (t->std), _(long_name), C_STD_NAME (t->std), _(long_name),
format_char, fki->name); format_char, fki->name);
} }
@ -2040,8 +2037,7 @@ argument_parser::find_format_char_info (char format_char)
format_warning_at_char (format_string_loc, format_string_cst, format_warning_at_char (format_string_loc, format_string_cst,
format_chars - orig_format_chars, format_chars - orig_format_chars,
OPT_Wformat_, OPT_Wformat_,
"unknown conversion type character" "unknown conversion type character %qc in format",
" %qc in format",
format_char); format_char);
return NULL; return NULL;
} }
@ -2128,8 +2124,7 @@ argument_parser::give_y2k_warnings (const format_char_info *fci,
y2k_level = 2; y2k_level = 2;
if (y2k_level == 3) if (y2k_level == 3)
warning_at (format_string_loc, OPT_Wformat_y2k, warning_at (format_string_loc, OPT_Wformat_y2k,
"%<%%%c%> yields only last 2 digits of " "%<%%%c%> yields only last 2 digits of year in some locales", format_char);
"year in some locales", format_char);
else if (y2k_level == 2) else if (y2k_level == 2)
warning_at (format_string_loc, OPT_Wformat_y2k, warning_at (format_string_loc, OPT_Wformat_y2k,
"%<%%%c%> yields only last 2 digits of year", "%<%%%c%> yields only last 2 digits of year",
@ -2188,9 +2183,7 @@ argument_parser::handle_conversions (const format_char_info *fci,
format_warning_at_char (format_string_loc, format_string_cst, format_warning_at_char (format_string_loc, format_string_cst,
format_chars - orig_format_chars, format_chars - orig_format_chars,
OPT_Wformat_, OPT_Wformat_,
"use of %qs length modifier with %qc type" "use of %qs length modifier with %qc type character has either no effect or undefined behavior",
" character has either no effect"
" or undefined behavior",
len_modifier.chars, format_char); len_modifier.chars, format_char);
/* Heuristic: skip one argument when an invalid length/type /* Heuristic: skip one argument when an invalid length/type
combination is encountered. */ combination is encountered. */
@ -2249,12 +2242,10 @@ check_argument_type (const format_char_info *fci,
{ {
if (suppressed) if (suppressed)
warning_at (format_string_loc, OPT_Wformat_, warning_at (format_string_loc, OPT_Wformat_,
"operand number specified with " "operand number specified with suppressed assignment");
"suppressed assignment");
else else
warning_at (format_string_loc, OPT_Wformat_, warning_at (format_string_loc, OPT_Wformat_,
"operand number specified for format " "operand number specified for format taking no argument");
"taking no argument");
} }
} }
else else
@ -2576,8 +2567,7 @@ check_format_info_main (format_check_results *res,
format_warning_at_char (format_string_loc, format_string_cst, format_warning_at_char (format_string_loc, format_string_cst,
format_chars - orig_format_chars, format_chars - orig_format_chars,
OPT_Wformat_, OPT_Wformat_,
"%qc directive redundant after prior " "%qc directive redundant after prior occurence of the same", format_char);
"occurence of the same", format_char);
else if (!color_begin) else if (!color_begin)
format_warning_at_char (format_string_loc, format_string_cst, format_warning_at_char (format_string_loc, format_string_cst,
format_chars - orig_format_chars, format_chars - orig_format_chars,
@ -2594,8 +2584,7 @@ check_format_info_main (format_check_results *res,
format_warning_at_char (format_string_loc, format_string_cst, format_warning_at_char (format_string_loc, format_string_cst,
format_chars - orig_format_chars, format_chars - orig_format_chars,
OPT_Wformat_, OPT_Wformat_,
"%qc conversion used within a quoted " "%qc conversion used within a quoted sequence",
"sequence",
format_char); format_char);
} }
@ -2821,16 +2810,14 @@ check_format_types (const substring_loc &fmt_loc,
&& i == 0 && i == 0
&& cur_param != 0 && cur_param != 0
&& integer_zerop (cur_param)) && integer_zerop (cur_param))
warning (OPT_Wformat_, "writing through null pointer " warning (OPT_Wformat_, "writing through null pointer (argument %d)", arg_num);
"(argument %d)", arg_num);
/* Check for reading through a NULL pointer. */ /* Check for reading through a NULL pointer. */
if (types->reading_from_flag if (types->reading_from_flag
&& i == 0 && i == 0
&& cur_param != 0 && cur_param != 0
&& integer_zerop (cur_param)) && integer_zerop (cur_param))
warning (OPT_Wformat_, "reading through null pointer " warning (OPT_Wformat_, "reading through null pointer (argument %d)", arg_num);
"(argument %d)", arg_num);
if (cur_param != 0 && TREE_CODE (cur_param) == ADDR_EXPR) if (cur_param != 0 && TREE_CODE (cur_param) == ADDR_EXPR)
cur_param = TREE_OPERAND (cur_param, 0); cur_param = TREE_OPERAND (cur_param, 0);
@ -2849,8 +2836,7 @@ check_format_types (const substring_loc &fmt_loc,
&& (CONSTANT_CLASS_P (cur_param) && (CONSTANT_CLASS_P (cur_param)
|| (DECL_P (cur_param) || (DECL_P (cur_param)
&& TREE_READONLY (cur_param)))))) && TREE_READONLY (cur_param))))))
warning (OPT_Wformat_, "writing into constant object " warning (OPT_Wformat_, "writing into constant object (argument %d)", arg_num);
"(argument %d)", arg_num);
/* If there are extra type qualifiers beyond the first /* If there are extra type qualifiers beyond the first
indirection, then this makes the types technically indirection, then this makes the types technically
@ -2861,8 +2847,7 @@ check_format_types (const substring_loc &fmt_loc,
|| TYPE_VOLATILE (cur_type) || TYPE_VOLATILE (cur_type)
|| TYPE_ATOMIC (cur_type) || TYPE_ATOMIC (cur_type)
|| TYPE_RESTRICT (cur_type))) || TYPE_RESTRICT (cur_type)))
warning (OPT_Wformat_, "extra type qualifiers in format " warning (OPT_Wformat_, "extra type qualifiers in format argument (argument %d)",
"argument (argument %d)",
arg_num); arg_num);
} }
@ -3095,8 +3080,7 @@ check_kef_type (const substring_loc &fmt_loc,
|| TYPE_VOLATILE (cur_type) || TYPE_VOLATILE (cur_type)
|| TYPE_ATOMIC (cur_type) || TYPE_ATOMIC (cur_type)
|| TYPE_RESTRICT (cur_type))) || TYPE_RESTRICT (cur_type)))
warning (OPT_Wformat_, "extra type qualifiers in format " warning (OPT_Wformat_, "extra type qualifiers in format argument (argument %d)",
"argument (argument %d)",
arg_num); arg_num);
} }
@ -3695,8 +3679,7 @@ format_type_warning (const substring_loc &whole_fmt_loc,
format_warning_at_substring format_warning_at_substring
(fmt_loc, &fmt_label, param_loc, &param_label, (fmt_loc, &fmt_label, param_loc, &param_label,
corrected_substring, OPT_Wformat_, corrected_substring, OPT_Wformat_,
"%s %<%s%.*s%> expects argument of type %<%s%s%>, " "%s %<%s%.*s%> expects argument of type %<%s%s%>, but argument %d has type %qT%s",
"but argument %d has type %qT%s",
gettext (kind_descriptions[kind]), gettext (kind_descriptions[kind]),
(kind == CF_KIND_FORMAT ? "%" : ""), (kind == CF_KIND_FORMAT ? "%" : ""),
format_length, format_start, format_length, format_start,
@ -3716,8 +3699,7 @@ format_type_warning (const substring_loc &whole_fmt_loc,
format_warning_at_substring format_warning_at_substring
(fmt_loc, &fmt_label, param_loc, &param_label, (fmt_loc, &fmt_label, param_loc, &param_label,
corrected_substring, OPT_Wformat_, corrected_substring, OPT_Wformat_,
"%s %<%s%.*s%> expects argument of type %<%T%s%>, " "%s %<%s%.*s%> expects argument of type %<%T%s%>, but argument %d has type %qT%s",
"but argument %d has type %qT%s",
gettext (kind_descriptions[kind]), gettext (kind_descriptions[kind]),
(kind == CF_KIND_FORMAT ? "%" : ""), (kind == CF_KIND_FORMAT ? "%" : ""),
format_length, format_start, format_length, format_start,

Some files were not shown because too many files have changed in this diff Show more