From a724893036a55733e1ef0bd93050a860cc1288cd Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 10 Mar 2017 19:07:15 -0500 Subject: [PATCH] eigrp: Fix Compile issues Signed-off-by: Donald Sharp --- eigrpd/eigrp_hello.c | 4 ++-- eigrpd/eigrp_packet.c | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/eigrpd/eigrp_hello.c b/eigrpd/eigrp_hello.c index df4ed1069f..0071c2c6a7 100644 --- a/eigrpd/eigrp_hello.c +++ b/eigrpd/eigrp_hello.c @@ -94,8 +94,8 @@ eigrp_hello_timer (struct thread *thread) ei->t_hello = NULL; if (IS_DEBUG_EIGRP(0, TIMERS)) - zlog (NULL, LOG_DEBUG, "Start Hello Timer (%s) Expire [%u]", - IF_NAME(ei), EIGRP_IF_PARAM(ei, v_hello)); + zlog_debug ("Start Hello Timer (%s) Expire [%u]", + IF_NAME(ei), EIGRP_IF_PARAM(ei, v_hello)); /* Sending hello packet. */ eigrp_hello_send(ei, EIGRP_HELLO_NORMAL, NULL); diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c index 9a0a9897f0..75be2eff3d 100644 --- a/eigrpd/eigrp_packet.c +++ b/eigrpd/eigrp_packet.c @@ -519,13 +519,16 @@ eigrp_read (struct thread *thread) /* Note that sockopt_iphdrincl_swab_systoh was called in eigrp_recv_packet. */ if (ifp == NULL) { + struct connected *c; /* 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. */ - ifp = if_lookup_address((void *)&iph->ip_src, VRF_DEFAULT); + c = if_lookup_address((void *)&iph->ip_src, VRF_DEFAULT); - if (ifp == NULL) + if (c == NULL) return 0; + + ifp = c->ifp; } /* associate packet with eigrp interface */ @@ -706,9 +709,8 @@ eigrp_read (struct thread *thread) eigrp_update_receive(eigrp, iph, eigrph, ibuf, ei, length); break; default: - zlog(NULL, LOG_WARNING, - "interface %s: EIGRP packet header type %d unsupported", - IF_NAME(ei), opcode); + zlog_warn("interface %s: EIGRP packet header type %d unsupported", + IF_NAME(ei), opcode); break; } -- 2.39.5