summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_neighbor.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-06-15 21:10:00 +0200
committerRafael Zalamena <rzalamena@opensourcerouting.org>2019-08-07 03:41:54 +0200
commit2ea6b572b51e6bc4c8fd197c26d06d9ecd3d1f2d (patch)
treed7067b975ccda243d2efd64736f1c25e292920ea /eigrpd/eigrp_neighbor.c
parenteigrpd: Remove VRF_DEFAULT from eigrp_fsm.c (diff)
downloadfrr-2ea6b572b51e6bc4c8fd197c26d06d9ecd3d1f2d.tar.xz
frr-2ea6b572b51e6bc4c8fd197c26d06d9ecd3d1f2d.zip
eigrpd: Convert eigrp_neighor.c to not use VRF_DEFAULT
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_neighbor.c')
-rw-r--r--eigrpd/eigrp_neighbor.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/eigrpd/eigrp_neighbor.c b/eigrpd/eigrp_neighbor.c
index 71124dfd0..2ae3997fa 100644
--- a/eigrpd/eigrp_neighbor.c
+++ b/eigrpd/eigrp_neighbor.c
@@ -194,13 +194,12 @@ void eigrp_nbr_delete(struct eigrp_neighbor *nbr)
int holddown_timer_expired(struct thread *thread)
{
- struct eigrp_neighbor *nbr;
-
- nbr = THREAD_ARG(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),
- ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
+ ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id));
nbr->state = EIGRP_NEIGHBOR_DOWN;
eigrp_nbr_delete(nbr);
@@ -297,19 +296,13 @@ void eigrp_nbr_state_update(struct eigrp_neighbor *nbr)
}
}
-int eigrp_nbr_count_get(void)
+int eigrp_nbr_count_get(struct eigrp *eigrp)
{
struct eigrp_interface *iface;
struct listnode *node, *node2, *nnode2;
struct eigrp_neighbor *nbr;
- struct eigrp *eigrp = eigrp_lookup(VRF_DEFAULT);
uint32_t counter;
- if (eigrp == NULL) {
- zlog_debug("EIGRP Routing Process not enabled");
- return 0;
- }
-
counter = 0;
for (ALL_LIST_ELEMENTS_RO(eigrp->eiflist, node, iface)) {
for (ALL_LIST_ELEMENTS(iface->nbrs, node2, nnode2, nbr)) {
@@ -335,20 +328,16 @@ int eigrp_nbr_count_get(void)
*/
void eigrp_nbr_hard_restart(struct eigrp_neighbor *nbr, struct vty *vty)
{
- if (nbr == NULL) {
- flog_err(EC_EIGRP_CONFIG,
- "Nbr Hard restart: Neighbor not specified.");
- return;
- }
+ struct eigrp *eigrp = nbr->ei->eigrp;
zlog_debug("Neighbor %s (%s) is down: manually cleared",
inet_ntoa(nbr->src),
- ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
+ 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),
- ifindex2ifname(nbr->ei->ifp->ifindex, VRF_DEFAULT));
+ ifindex2ifname(nbr->ei->ifp->ifindex, eigrp->vrf_id));
}
/* send Hello with Peer Termination TLV */