Merge pull request #7360 from donaldsharp/eigrp_printing

eigrpd: Replace inet_ntoa with %pI4
This commit is contained in:
Donatas Abraitis 2020-10-22 08:52:13 +03:00 committed by GitHub
commit e58496183e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 104 additions and 132 deletions

View File

@ -122,8 +122,8 @@ void eigrp_ip_header_dump(struct ip *iph)
zlog_debug("ip_ttl %u", iph->ip_ttl);
zlog_debug("ip_p %u", iph->ip_p);
zlog_debug("ip_sum 0x%x", (uint32_t)iph->ip_sum);
zlog_debug("ip_src %s", inet_ntoa(iph->ip_src));
zlog_debug("ip_dst %s", inet_ntoa(iph->ip_dst));
zlog_debug("ip_src %pI4", &iph->ip_src);
zlog_debug("ip_dst %pI4", &iph->ip_dst);
}
/*
@ -204,8 +204,7 @@ void show_ip_eigrp_neighbor_sub(struct vty *vty, struct eigrp_neighbor *nbr,
int detail)
{
vty_out(vty, "%-3u %-17s %-21s", 0, eigrp_neigh_ip_string(nbr),
IF_NAME(nbr->ei));
vty_out(vty, "%-3u %-17pI4 %-21s", 0, &nbr->src, IF_NAME(nbr->ei));
if (nbr->t_holddown)
vty_out(vty, "%-7lu",
thread_timer_remain_second(nbr->t_holddown));
@ -231,8 +230,8 @@ void show_ip_eigrp_neighbor_sub(struct vty *vty, struct eigrp_neighbor *nbr,
*/
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,
inet_ntoa(eigrp->router_id));
vty_out(vty, "\nEIGRP Topology Table for AS(%d)/ID(%pI4)\n\n",
eigrp->AS, &eigrp->router_id);
vty_out(vty,
"Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply\n r - reply Status, s - sia Status\n\n");
}
@ -269,8 +268,8 @@ void show_ip_eigrp_nexthop_entry(struct vty *vty, struct eigrp *eigrp,
vty_out(vty, "%-7s%s, %s\n", " ", "via Connected",
IF_NAME(te->ei));
else {
vty_out(vty, "%-7s%s%s (%u/%u), %s\n", " ", "via ",
inet_ntoa(te->adv_router->src), te->distance,
vty_out(vty, "%-7s%s%pI4 (%u/%u), %s\n", " ", "via ",
&te->adv_router->src, te->distance,
te->reported_distance, IF_NAME(te->ei));
}
}

View File

@ -138,21 +138,6 @@ extern unsigned long term_debug_eigrp_zebra;
/* Prototypes. */
extern const char *eigrp_if_name_string(struct eigrp_interface *);
static inline const char
*eigrp_topology_ip_string(struct eigrp_prefix_entry *tn)
{
return inet_ntoa(tn->destination->u.prefix4);
}
static inline const char *eigrp_if_ip_string(struct eigrp_interface *ei)
{
return ei ? inet_ntoa(ei->address.u.prefix4) : "inactive";
}
static inline const char *eigrp_neigh_ip_string(struct eigrp_neighbor *nbr)
{
return inet_ntoa(nbr->src);
}
extern void eigrp_ip_header_dump(struct ip *);
extern void eigrp_header_dump(struct eigrp_header *);

View File

@ -417,9 +417,9 @@ int eigrp_fsm_event(struct eigrp_fsm_action_message *msg)
enum eigrp_fsm_events event = eigrp_get_fsm_event(msg);
zlog_info(
"EIGRP AS: %d State: %s Event: %s Network: %s Packet Type: %s Reply RIJ Count: %d change: %s",
"EIGRP AS: %d State: %s Event: %s Network: %pI4 Packet Type: %s Reply RIJ Count: %d change: %s",
msg->eigrp->AS, prefix_state2str(msg->prefix->state),
fsm_state2str(event), eigrp_topology_ip_string(msg->prefix),
fsm_state2str(event), &msg->prefix->destination->u.prefix4,
packet_type2str(msg->packet_type), msg->prefix->rij->count,
change2str(msg->change));
(*(NSM[msg->prefix->state][event].func))(msg);

View File

@ -144,10 +144,11 @@ eigrp_hello_parameter_decode(struct eigrp_neighbor *nbr,
&& (eigrp->k_values[4] == nbr->K5)) {
if (eigrp_nbr_state_get(nbr) == EIGRP_NEIGHBOR_DOWN) {
zlog_info("Neighbor %s (%s) is pending: new adjacency",
inet_ntoa(nbr->src),
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
zlog_info(
"Neighbor %pI4 (%s) is pending: new adjacency",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
/* Expedited hello sent */
eigrp_hello_send(nbr->ei, EIGRP_HELLO_NORMAL, NULL);
@ -164,16 +165,16 @@ eigrp_hello_parameter_decode(struct eigrp_neighbor *nbr,
& param->K5)
== 255) {
zlog_info(
"Neighbor %s (%s) is down: Interface PEER-TERMINATION received",
inet_ntoa(nbr->src),
"Neighbor %pI4 (%s) is down: Interface PEER-TERMINATION received",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
eigrp_nbr_delete(nbr);
return NULL;
} else {
zlog_info(
"Neighbor %s (%s) going down: Kvalue mismatch",
inet_ntoa(nbr->src),
"Neighbor %pI4 (%s) going down: Kvalue mismatch",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
eigrp_nbr_state_set(nbr, EIGRP_NEIGHBOR_DOWN);
@ -253,9 +254,10 @@ static void eigrp_peer_termination_decode(struct eigrp_neighbor *nbr,
uint32_t received_ip = param->neighbor_ip;
if (my_ip == received_ip) {
zlog_info("Neighbor %s (%s) is down: Peer Termination received",
inet_ntoa(nbr->src),
ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id));
zlog_info(
"Neighbor %pI4 (%s) is down: Peer Termination received",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id));
/* set neighbor to DOWN */
nbr->state = EIGRP_NEIGHBOR_DOWN;
/* delete neighbor */
@ -330,9 +332,9 @@ void eigrp_hello_receive(struct eigrp *eigrp, struct ip *iph,
assert(nbr);
if (IS_DEBUG_EIGRP_PACKET(eigrph->opcode - 1, RECV))
zlog_debug("Processing Hello size[%u] int(%s) nbr(%s)", size,
zlog_debug("Processing Hello size[%u] int(%s) nbr(%pI4)", size,
ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id),
inet_ntoa(nbr->src));
&nbr->src);
size -= EIGRP_HEADER_LEN;
if (size < 0)
@ -403,8 +405,7 @@ void eigrp_hello_receive(struct eigrp *eigrp, struct ip *iph,
}
if (IS_DEBUG_EIGRP_PACKET(0, RECV))
zlog_debug("Hello Packet received from %s",
inet_ntoa(nbr->src));
zlog_debug("Hello Packet received from %pI4", &nbr->src);
}
uint32_t FRR_MAJOR;
@ -708,9 +709,8 @@ void eigrp_hello_send_ack(struct eigrp_neighbor *nbr)
if (ep) {
if (IS_DEBUG_EIGRP_PACKET(0, SEND))
zlog_debug("Queueing [Hello] Ack Seq [%u] nbr [%s]",
nbr->recv_sequence_number,
inet_ntoa(nbr->src));
zlog_debug("Queueing [Hello] Ack Seq [%u] nbr [%pI4]",
nbr->recv_sequence_number, &nbr->src);
/* Add packet to the top of the interface output queue*/
eigrp_fifo_push(nbr->ei->obuf, ep);

View File

@ -87,10 +87,6 @@ static struct eigrp_neighbor *eigrp_nbr_add(struct eigrp_interface *ei,
nbr = eigrp_nbr_new(ei);
nbr->src = iph->ip_src;
// if (IS_DEBUG_EIGRP_EVENT)
// zlog_debug("NSM[%s:%s]: start", IF_NAME (nbr->oi),
// inet_ntoa (nbr->router_id));
return nbr;
}
@ -197,8 +193,7 @@ int holddown_timer_expired(struct thread *thread)
struct eigrp_neighbor *nbr = THREAD_ARG(thread);
struct eigrp *eigrp = nbr->ei->eigrp;
zlog_info("Neighbor %s (%s) is down: holding time expired",
inet_ntoa(nbr->src),
zlog_info("Neighbor %pI4 (%s) is down: holding time expired", &nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id));
nbr->state = EIGRP_NEIGHBOR_DOWN;
eigrp_nbr_delete(nbr);
@ -330,13 +325,12 @@ void eigrp_nbr_hard_restart(struct eigrp_neighbor *nbr, struct vty *vty)
{
struct eigrp *eigrp = nbr->ei->eigrp;
zlog_debug("Neighbor %s (%s) is down: manually cleared",
inet_ntoa(nbr->src),
zlog_debug("Neighbor %pI4 (%s) is down: manually cleared", &nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id));
if (vty != NULL) {
vty_time_print(vty, 0);
vty_out(vty, "Neighbor %s (%s) is down: manually cleared\n",
inet_ntoa(nbr->src),
vty_out(vty, "Neighbor %pI4 (%s) is down: manually cleared\n",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id));
}

View File

@ -160,9 +160,8 @@ int eigrp_if_ipmulticast(struct eigrp *top, struct prefix *p,
ret = setsockopt_ipv4_multicast_if(top->fd, p->u.prefix4, ifindex);
if (ret < 0)
zlog_warn(
"can't setsockopt IP_MULTICAST_IF (fd %d, addr %s, ifindex %u): %s",
top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno));
"can't setsockopt IP_MULTICAST_IF (fd %d, addr %pI4, ifindex %u): %s",
top->fd, &p->u.prefix4, ifindex, safe_strerror(errno));
return ret;
}
@ -178,12 +177,11 @@ int eigrp_if_add_allspfrouters(struct eigrp *top, struct prefix *p,
htonl(EIGRP_MULTICAST_ADDRESS), ifindex);
if (ret < 0)
zlog_warn(
"can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllSPFRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?",
top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno));
"can't setsockopt IP_ADD_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllSPFRouters): %s; perhaps a kernel limit on # of multicast group memberships has been exceeded?",
top->fd, &p->u.prefix4, ifindex, safe_strerror(errno));
else
zlog_debug("interface %s [%u] join EIGRP Multicast group.",
inet_ntoa(p->u.prefix4), ifindex);
zlog_debug("interface %pI4 [%u] join EIGRP Multicast group.",
&p->u.prefix4, ifindex);
return ret;
}
@ -198,12 +196,11 @@ int eigrp_if_drop_allspfrouters(struct eigrp *top, struct prefix *p,
htonl(EIGRP_MULTICAST_ADDRESS), ifindex);
if (ret < 0)
zlog_warn(
"can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %s, ifindex %u, AllSPFRouters): %s",
top->fd, inet_ntoa(p->u.prefix4), ifindex,
safe_strerror(errno));
"can't setsockopt IP_DROP_MEMBERSHIP (fd %d, addr %pI4, ifindex %u, AllSPFRouters): %s",
top->fd, &p->u.prefix4, ifindex, safe_strerror(errno));
else
zlog_debug("interface %s [%u] leave EIGRP Multicast group.",
inet_ntoa(p->u.prefix4), ifindex);
zlog_debug("interface %pI4 [%u] leave EIGRP Multicast group.",
&p->u.prefix4, ifindex);
return ret;
}

View File

@ -442,17 +442,16 @@ int eigrp_write(struct thread *thread)
if (IS_DEBUG_EIGRP_TRANSMIT(0, SEND)) {
eigrph = (struct eigrp_header *)STREAM_DATA(ep->s);
zlog_debug(
"Sending [%s][%d/%d] to [%s] via [%s] ret [%d].",
"Sending [%s][%d/%d] to [%pI4] via [%s] ret [%d].",
lookup_msg(eigrp_packet_type_str, eigrph->opcode, NULL),
seqno, ack, inet_ntoa(ep->dst), IF_NAME(ei), ret);
seqno, ack, &ep->dst, IF_NAME(ei), ret);
}
if (ret < 0)
zlog_warn(
"*** sendmsg in eigrp_write failed to %s, id %d, off %d, len %d, interface %s, mtu %u: %s",
inet_ntoa(iph.ip_dst), iph.ip_id, iph.ip_off,
iph.ip_len, ei->ifp->name, ei->ifp->mtu,
safe_strerror(errno));
"*** sendmsg in eigrp_write failed to %pI4, id %d, off %d, len %d, interface %s, mtu %u: %s",
&iph.ip_dst, iph.ip_id, iph.ip_off, iph.ip_len,
ei->ifp->name, ei->ifp->mtu, safe_strerror(errno));
/* Now delete packet from queue. */
eigrp_packet_delete(ei);
@ -552,8 +551,8 @@ int eigrp_read(struct thread *thread)
|| (IPV4_ADDR_SAME(&srcaddr, &ei->address.u.prefix4))) {
if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV))
zlog_debug(
"eigrp_read[%s]: Dropping self-originated packet",
inet_ntoa(srcaddr));
"eigrp_read[%pI4]: Dropping self-originated packet",
&srcaddr);
return 0;
}
@ -596,8 +595,9 @@ int eigrp_read(struct thread *thread)
*/
else if (ei->ifp != ifp) {
if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV))
zlog_warn("Packet from [%s] received on wrong link %s",
inet_ntoa(iph->ip_src), ifp->name);
zlog_warn(
"Packet from [%pI4] received on wrong link %s",
&iph->ip_src, ifp->name);
return 0;
}
@ -606,8 +606,8 @@ int eigrp_read(struct thread *thread)
if (ret < 0) {
if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV))
zlog_debug(
"eigrp_read[%s]: Header check failed, dropping.",
inet_ntoa(iph->ip_src));
"eigrp_read[%pI4]: Header check failed, dropping.",
&iph->ip_src);
return ret;
}
@ -615,17 +615,12 @@ int eigrp_read(struct thread *thread)
start of the eigrp TLVs */
opcode = eigrph->opcode;
if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV)) {
char src[PREFIX_STRLEN], dst[PREFIX_STRLEN];
strlcpy(src, inet_ntoa(iph->ip_src), sizeof(src));
strlcpy(dst, inet_ntoa(iph->ip_dst), sizeof(dst));
if (IS_DEBUG_EIGRP_TRANSMIT(0, RECV))
zlog_debug(
"Received [%s][%d/%d] length [%u] via [%s] src [%s] dst [%s]",
"Received [%s][%d/%d] length [%u] via [%s] src [%pI4] dst [%pI4]",
lookup_msg(eigrp_packet_type_str, opcode, NULL),
ntohl(eigrph->sequence), ntohl(eigrph->ack), length,
IF_NAME(ei), src, dst);
}
IF_NAME(ei), &iph->ip_src, &iph->ip_dst);
/* Read rest of the packet and call each sort of packet routine. */
stream_forward_getp(ibuf, EIGRP_HEADER_LEN);
@ -648,8 +643,9 @@ int eigrp_read(struct thread *thread)
&& (ntohl(eigrph->ack)
== nbr->init_sequence_number)) {
eigrp_nbr_state_set(nbr, EIGRP_NEIGHBOR_UP);
zlog_info("Neighbor(%s) adjacency became full",
inet_ntoa(nbr->src));
zlog_info(
"Neighbor(%pI4) adjacency became full",
&nbr->src);
nbr->init_sequence_number = 0;
nbr->recv_sequence_number =
ntohl(eigrph->sequence);
@ -957,8 +953,8 @@ static int eigrp_verify_header(struct stream *ibuf, struct eigrp_interface *ei,
/* Check network mask, Silently discarded. */
if (!eigrp_check_network_mask(ei, iph->ip_src)) {
zlog_warn(
"interface %s: eigrp_read network address is not same [%s]",
IF_NAME(ei), inet_ntoa(iph->ip_src));
"interface %s: eigrp_read network address is not same [%pI4]",
IF_NAME(ei), &iph->ip_src);
return -1;
}
//

View File

@ -209,18 +209,18 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
nbr->recv_sequence_number = ntohl(eigrph->sequence);
if (IS_DEBUG_EIGRP_PACKET(0, RECV))
zlog_debug(
"Processing Update size[%u] int(%s) nbr(%s) seq [%u] flags [%0x]",
"Processing Update size[%u] int(%s) nbr(%pI4) seq [%u] flags [%0x]",
size,
ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id),
inet_ntoa(nbr->src), nbr->recv_sequence_number, flags);
&nbr->src, nbr->recv_sequence_number, flags);
if ((flags == (EIGRP_INIT_FLAG + EIGRP_RS_FLAG + EIGRP_EOT_FLAG))
&& (!same)) {
/* Graceful restart Update received with all routes */
zlog_info("Neighbor %s (%s) is resync: peer graceful-restart",
inet_ntoa(nbr->src),
zlog_info("Neighbor %pI4 (%s) is resync: peer graceful-restart",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id));
/* get all prefixes from neighbor from topology table */
@ -231,8 +231,8 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
/* Graceful restart Update received, routes also in next packet
*/
zlog_info("Neighbor %s (%s) is resync: peer graceful-restart",
inet_ntoa(nbr->src),
zlog_info("Neighbor %pI4 (%s) is resync: peer graceful-restart",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id));
/* get all prefixes from neighbor from topology table */
@ -279,15 +279,16 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
eigrp_nbr_state_set(nbr, EIGRP_NEIGHBOR_DOWN);
eigrp_topology_neighbor_down(nbr->ei->eigrp, nbr);
nbr->recv_sequence_number = ntohl(eigrph->sequence);
zlog_info("Neighbor %s (%s) is down: peer restarted",
inet_ntoa(nbr->src),
zlog_info("Neighbor %pI4 (%s) is down: peer restarted",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
eigrp_nbr_state_set(nbr, EIGRP_NEIGHBOR_PENDING);
zlog_info("Neighbor %s (%s) is pending: new adjacency",
inet_ntoa(nbr->src),
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
zlog_info(
"Neighbor %pI4 (%s) is pending: new adjacency",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
eigrp_update_send_init(nbr);
}
}
@ -450,8 +451,9 @@ void eigrp_update_send_init(struct eigrp_neighbor *nbr)
nbr->init_sequence_number = nbr->ei->eigrp->sequence_number;
ep->sequence_number = nbr->ei->eigrp->sequence_number;
if (IS_DEBUG_EIGRP_PACKET(0, RECV))
zlog_debug("Enqueuing Update Init Len [%u] Seq [%u] Dest [%s]",
ep->length, ep->sequence_number, inet_ntoa(ep->dst));
zlog_debug(
"Enqueuing Update Init Len [%u] Seq [%u] Dest [%pI4]",
ep->length, ep->sequence_number, &ep->dst);
/*Put packet to retransmission queue*/
eigrp_fifo_push(nbr->retrans_queue, ep);
@ -480,8 +482,9 @@ static void eigrp_update_place_on_nbr_queue(struct eigrp_neighbor *nbr,
ep->sequence_number = seq_no;
if (IS_DEBUG_EIGRP_PACKET(0, RECV))
zlog_debug("Enqueuing Update Init Len [%u] Seq [%u] Dest [%s]",
ep->length, ep->sequence_number, inet_ntoa(ep->dst));
zlog_debug(
"Enqueuing Update Init Len [%u] Seq [%u] Dest [%pI4]",
ep->length, ep->sequence_number, &ep->dst);
/*Put packet to retransmission queue*/
eigrp_fifo_push(nbr->retrans_queue, ep);
@ -815,8 +818,8 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
if (eigrp_update_prefix_apply(eigrp, ei, EIGRP_FILTER_OUT,
dest_addr)) {
/* do not send filtered route */
zlog_info("Filtered prefix %s won't be sent out.",
inet_ntoa(dest_addr->u.prefix4));
zlog_info("Filtered prefix %pI4 won't be sent out.",
&dest_addr->u.prefix4);
} else {
/* sending route which wasn't filtered */
length += eigrp_add_internalTLV_to_stream(ep->s, pe);
@ -830,8 +833,8 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
if (eigrp_update_prefix_apply(eigrp, ei, EIGRP_FILTER_IN,
dest_addr)) {
/* do not send filtered route */
zlog_info("Filtered prefix %s will be removed.",
inet_ntoa(dest_addr->u.prefix4));
zlog_info("Filtered prefix %pI4 will be removed.",
&dest_addr->u.prefix4);
/* prepare message for FSM */
struct eigrp_fsm_action_message fsm_msg;
@ -880,8 +883,9 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
ep->sequence_number = eigrp->sequence_number;
if (IS_DEBUG_EIGRP_PACKET(0, RECV))
zlog_debug("Enqueuing Update Init Len [%u] Seq [%u] Dest [%s]",
ep->length, ep->sequence_number, inet_ntoa(ep->dst));
zlog_debug(
"Enqueuing Update Init Len [%u] Seq [%u] Dest [%pI4]",
ep->length, ep->sequence_number, &ep->dst);
/*Put packet to retransmission queue*/
eigrp_fifo_push(nbr->retrans_queue, ep);
@ -963,20 +967,20 @@ void eigrp_update_send_GR(struct eigrp_neighbor *nbr, enum GR_type gr_type,
if (gr_type == EIGRP_GR_FILTER) {
/* function was called after applying filtration */
zlog_info(
"Neighbor %s (%s) is resync: route configuration changed",
inet_ntoa(nbr->src),
"Neighbor %pI4 (%s) is resync: route configuration changed",
&nbr->src,
ifindex2ifname(ei->ifp->ifindex, eigrp->vrf_id));
} else if (gr_type == EIGRP_GR_MANUAL) {
/* Graceful restart was called manually */
zlog_info("Neighbor %s (%s) is resync: manually cleared",
inet_ntoa(nbr->src),
zlog_info("Neighbor %pI4 (%s) is resync: manually cleared",
&nbr->src,
ifindex2ifname(ei->ifp->ifindex, eigrp->vrf_id));
if (vty != NULL) {
vty_time_print(vty, 0);
vty_out(vty,
"Neighbor %s (%s) is resync: manually cleared\n",
inet_ntoa(nbr->src),
"Neighbor %pI4 (%s) is resync: manually cleared\n",
&nbr->src,
ifindex2ifname(ei->ifp->ifindex,
eigrp->vrf_id));
}

View File

@ -360,14 +360,14 @@ DEFPY (clear_ip_eigrp_neighbors,
for (ALL_LIST_ELEMENTS(ei->nbrs, node2, nnode2, nbr)) {
if (nbr->state != EIGRP_NEIGHBOR_DOWN) {
zlog_debug(
"Neighbor %s (%s) is down: manually cleared",
inet_ntoa(nbr->src),
"Neighbor %pI4 (%s) is down: manually cleared",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
vty_time_print(vty, 0);
vty_out(vty,
"Neighbor %s (%s) is down: manually cleared\n",
inet_ntoa(nbr->src),
"Neighbor %pI4 (%s) is down: manually cleared\n",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
@ -420,14 +420,15 @@ DEFPY (clear_ip_eigrp_neighbors_int,
/* iterate over all neighbors on eigrp interface */
for (ALL_LIST_ELEMENTS(ei->nbrs, node2, nnode2, nbr)) {
if (nbr->state != EIGRP_NEIGHBOR_DOWN) {
zlog_debug("Neighbor %s (%s) is down: manually cleared",
inet_ntoa(nbr->src),
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
zlog_debug(
"Neighbor %pI4 (%s) is down: manually cleared",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));
vty_time_print(vty, 0);
vty_out(vty,
"Neighbor %s (%s) is down: manually cleared\n",
inet_ntoa(nbr->src),
"Neighbor %pI4 (%s) is down: manually cleared\n",
&nbr->src,
ifindex2ifname(nbr->ei->ifp->ifindex,
eigrp->vrf_id));

View File

@ -110,10 +110,6 @@ void eigrp_router_id_update(struct eigrp *eigrp)
eigrp->router_id = router_id;
if (router_id_old.s_addr != router_id.s_addr) {
// if (IS_DEBUG_EIGRP_EVENT)
// zlog_debug("Router-ID[NEW:%s]: Update",
// inet_ntoa(eigrp->router_id));
/* update eigrp_interface's */
FOR_ALL_INTERFACES (vrf, ifp)
eigrp_if_update(ifp);