From: Donald Sharp Date: Thu, 6 Apr 2017 01:01:31 +0000 (-0400) Subject: eigrpd: Cleanup the merge X-Git-Tag: reindent-master-before~197^2~16 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ca975a87e0ac727df7f04911994aede9015fbe11;p=mirror%2Ffrr.git eigrpd: Cleanup the merge Signed-off-by: Donald Sharp --- diff --git a/eigrpd/eigrp_filter.c b/eigrpd/eigrp_filter.c index aaac379d9b..b36d0fbc9b 100644 --- a/eigrpd/eigrp_filter.c +++ b/eigrpd/eigrp_filter.c @@ -186,7 +186,7 @@ eigrp_distribute_update (struct distribute *dist) return; } - ifp = if_lookup_by_name (dist->ifname); + ifp = if_lookup_by_name (dist->ifname, VRF_DEFAULT); if (ifp == NULL) return; diff --git a/eigrpd/eigrp_hello.c b/eigrpd/eigrp_hello.c index 0071c2c6a7..81bc408b6a 100644 --- a/eigrpd/eigrp_hello.c +++ b/eigrpd/eigrp_hello.c @@ -152,7 +152,7 @@ eigrp_hello_parameter_decode (struct eigrp_neighbor *nbr, 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)); + inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT)); /* Expedited hello sent */ eigrp_hello_send(nbr->ei, EIGRP_HELLO_NORMAL, NULL); @@ -170,13 +170,13 @@ eigrp_hello_parameter_decode (struct eigrp_neighbor *nbr, if ((param->K1 & param->K2 & param->K3 & param->K4 & param->K5) == 255) { zlog_info ("Neighbor %s (%s) is down: Interface PEER-TERMINATION received", - inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex)); + inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT)); eigrp_nbr_delete (nbr); } else { zlog_info ("Neighbor %s (%s) going down: Kvalue mismatch", - inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex)); + inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT)); eigrp_nbr_state_set(nbr, EIGRP_NEIGHBOR_DOWN); } } @@ -250,7 +250,7 @@ eigrp_peer_termination_decode (struct eigrp_neighbor *nbr, if(my_ip == received_ip) { zlog_info ("Neighbor %s (%s) is down: Peer Termination received", - inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex)); + inet_ntoa (nbr->src),ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT)); /* set neighbor to DOWN */ nbr->state = EIGRP_NEIGHBOR_DOWN; /* delete neighbor */ @@ -325,7 +325,7 @@ eigrp_hello_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *e if (IS_DEBUG_EIGRP_PACKET(eigrph->opcode - 1, RECV)) zlog_debug("Processing Hello size[%u] int(%s) nbr(%s)", - size, ifindex2ifname(nbr->ei->ifp->ifindex), + size, ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT), inet_ntoa(nbr->src)); size -= EIGRP_HEADER_LEN; diff --git a/eigrpd/eigrp_neighbor.c b/eigrpd/eigrp_neighbor.c index 8dcf76dc47..f03b9ff4db 100644 --- a/eigrpd/eigrp_neighbor.c +++ b/eigrpd/eigrp_neighbor.c @@ -209,7 +209,7 @@ holddown_timer_expired (struct thread *thread) nbr = THREAD_ARG (thread); zlog_info ("Neighbor %s (%s) is down: holding time expired", - inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex)); + inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT)); nbr->state = EIGRP_NEIGHBOR_DOWN; eigrp_nbr_delete (nbr); @@ -364,15 +364,15 @@ void eigrp_nbr_hard_restart(struct eigrp_neighbor *nbr, struct vty *vty) } zlog_debug ("Neighbor %s (%s) is down: manually cleared", - inet_ntoa (nbr->src), - ifindex2ifname (nbr->ei->ifp->ifindex)); + inet_ntoa (nbr->src), + ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT)); if(vty != NULL) { vty_time_print (vty, 0); vty_out (vty, "Neighbor %s (%s) is down: manually cleared%s", - inet_ntoa (nbr->src), - ifindex2ifname (nbr->ei->ifp->ifindex), - VTY_NEWLINE); + inet_ntoa (nbr->src), + ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT), + VTY_NEWLINE); } /* send Hello with Peer Termination TLV */ diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c index 75be2eff3d..ef69933255 100644 --- a/eigrpd/eigrp_packet.c +++ b/eigrpd/eigrp_packet.c @@ -523,7 +523,7 @@ eigrp_read (struct thread *thread) /* Handle cases where the platform does not support retrieving the ifindex, and also platforms (such as Solaris 8) that claim to support ifindex retrieval but do not. */ - c = if_lookup_address((void *)&iph->ip_src, VRF_DEFAULT); + c = if_lookup_address((void *)&iph->ip_src, AF_INET, VRF_DEFAULT); if (c == NULL) return 0; @@ -784,7 +784,7 @@ eigrp_recv_packet (int fd, struct interface **ifp, struct stream *ibuf) ifindex = getsockopt_ifindex(AF_INET, &msgh); - *ifp = if_lookup_by_index(ifindex); + *ifp = if_lookup_by_index(ifindex, VRF_DEFAULT); if (ret != ip_len) { diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c index 6857b53a6c..85fa432308 100644 --- a/eigrpd/eigrp_update.c +++ b/eigrpd/eigrp_update.c @@ -203,7 +203,7 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header * 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]", - size, ifindex2ifname(nbr->ei->ifp->ifindex), + size, ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT), inet_ntoa(nbr->src), nbr->recv_sequence_number, flags); @@ -213,7 +213,7 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header * /* Graceful restart Update received with all routes */ zlog_info("Neighbor %s (%s) is resync: peer graceful-restart", - inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex)); + inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT)); /* get all prefixes from neighbor from topology table */ nbr_prefixes = eigrp_neighbor_prefixes_lookup(eigrp, nbr); @@ -225,7 +225,7 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header * /* Graceful restart Update received, routes also in next packet */ zlog_info("Neighbor %s (%s) is resync: peer graceful-restart", - inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex)); + inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT)); /* get all prefixes from neighbor from topology table */ nbr_prefixes = eigrp_neighbor_prefixes_lookup(eigrp, nbr); @@ -277,10 +277,10 @@ eigrp_update_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header * 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), ifindex2ifname(nbr->ei->ifp->ifindex)); + inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT)); 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)); + inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT)); eigrp_update_send_init(nbr); } } @@ -1089,21 +1089,21 @@ eigrp_update_send_GR (struct eigrp_neighbor *nbr, enum GR_type gr_type, struct v { /* function was called after applying filtration */ zlog_info("Neighbor %s (%s) is resync: route configuration changed", - inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex)); + inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT)); } 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), ifindex2ifname(nbr->ei->ifp->ifindex)); + inet_ntoa(nbr->src), ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT)); if(vty != NULL) { vty_time_print (vty, 0); vty_out (vty, "Neighbor %s (%s) is resync: manually cleared%s", - inet_ntoa (nbr->src), - ifindex2ifname (nbr->ei->ifp->ifindex), - VTY_NEWLINE); + inet_ntoa (nbr->src), + ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT), + VTY_NEWLINE); } } diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c index 61a1732923..9f199b6918 100644 --- a/eigrpd/eigrp_vty.c +++ b/eigrpd/eigrp_vty.c @@ -1200,11 +1200,11 @@ DEFUN (clear_ip_eigrp_neighbors, { zlog_debug ("Neighbor %s (%s) is down: manually cleared", inet_ntoa (nbr->src), - ifindex2ifname (nbr->ei->ifp->ifindex)); + ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT)); vty_time_print (vty, 0); vty_out (vty, "Neighbor %s (%s) is down: manually cleared%s", inet_ntoa (nbr->src), - ifindex2ifname (nbr->ei->ifp->ifindex), + ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT), VTY_NEWLINE); /* set neighbor to DOWN */ @@ -1263,11 +1263,11 @@ DEFUN (clear_ip_eigrp_neighbors_int, { zlog_debug ("Neighbor %s (%s) is down: manually cleared", inet_ntoa (nbr->src), - ifindex2ifname (nbr->ei->ifp->ifindex)); + ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT)); vty_time_print (vty, 0); vty_out (vty, "Neighbor %s (%s) is down: manually cleared%s", inet_ntoa (nbr->src), - ifindex2ifname (nbr->ei->ifp->ifindex), + ifindex2ifname (nbr->ei->ifp->ifindex, VRF_DEFAULT), VTY_NEWLINE); /* set neighbor to DOWN */ diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c index 6f38079f69..0c99fd5a55 100644 --- a/eigrpd/eigrp_zebra.c +++ b/eigrpd/eigrp_zebra.c @@ -399,7 +399,8 @@ zebra_interface_if_lookup (struct stream *s) /* And look it up. */ return if_lookup_by_name_len (ifname_tmp, - strnlen (ifname_tmp, INTERFACE_NAMSIZ)); + strnlen (ifname_tmp, INTERFACE_NAMSIZ), + VRF_DEFAULT); } void diff --git a/lib/Makefile.am b/lib/Makefile.am index c4989c73c9..c33893be6a 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -32,7 +32,7 @@ libfrr_la_SOURCES = \ libfrr.c \ strlcpy.c \ strlcat.c \ - sha256.c + sha256.c \ module.c \ hook.c \ # end