From 057fad8dfb65167925c01237af31e1a4ecadabb3 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 May 2017 18:48:54 -0400 Subject: eigrpd: Cleanup a bunch SA warnings. 1) Cleanup SA warnings, more to come 2) Cleanup some non debug guarded zlog_info code Signed-off-by: Donald Sharp --- eigrpd/eigrp_query.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'eigrpd/eigrp_query.c') diff --git a/eigrpd/eigrp_query.c b/eigrpd/eigrp_query.c index 4488054e0..e52d4fa66 100644 --- a/eigrpd/eigrp_query.c +++ b/eigrpd/eigrp_query.c @@ -114,16 +114,17 @@ eigrp_query_receive (struct eigrp *eigrp, struct ip *iph, struct eigrp_header *e type = stream_getw(s); if (type == EIGRP_TLV_IPv4_INT) { + struct prefix_ipv4 dest_addr; + stream_set_getp(s, s->getp - sizeof(u_int16_t)); tlv = eigrp_read_ipv4_tlv(s); - struct prefix_ipv4 *dest_addr; - dest_addr = prefix_ipv4_new(); - dest_addr->prefix = tlv->destination; - dest_addr->prefixlen = tlv->prefix_length; + dest_addr.family = AFI_IP; + dest_addr.prefix = tlv->destination; + dest_addr.prefixlen = tlv->prefix_length; struct eigrp_prefix_entry *dest = - eigrp_topology_table_lookup_ipv4(eigrp->topology_table, dest_addr); + eigrp_topology_table_lookup_ipv4(eigrp->topology_table, &dest_addr); /* If the destination exists (it should, but one never know)*/ if (dest != NULL) -- cgit v1.2.3