summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_hello.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-10-03 01:50:39 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-10-03 03:24:59 +0200
commitb748db674ab6838f31c47f394350ab850ba22748 (patch)
treed05a3a9a41969022fab410fd7c6108033906a1fc /eigrpd/eigrp_hello.c
parenteigrpd: Start fixing eigrp_interface (diff)
downloadfrr-b748db674ab6838f31c47f394350ab850ba22748.tar.xz
frr-b748db674ab6838f31c47f394350ab850ba22748.zip
eigrpd: Remove ei mapping to connected routes
We need one struct eigrp_interface per ifp structure not a ifp->info structure with a ei per connected. Some minor code cleanup as well with macros and their weird usage. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_hello.c')
-rw-r--r--eigrpd/eigrp_hello.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/eigrpd/eigrp_hello.c b/eigrpd/eigrp_hello.c
index 49647c6b8..1cb265cf1 100644
--- a/eigrpd/eigrp_hello.c
+++ b/eigrpd/eigrp_hello.c
@@ -89,7 +89,7 @@ int eigrp_hello_timer(struct thread *thread)
if (IS_DEBUG_EIGRP(0, TIMERS))
zlog_debug("Start Hello Timer (%s) Expire [%u]", IF_NAME(ei),
- EIGRP_IF_PARAM(ei, v_hello));
+ ei->params.v_hello);
/* Sending hello packet. */
eigrp_hello_send(ei, EIGRP_HELLO_NORMAL, NULL);
@@ -97,7 +97,7 @@ int eigrp_hello_timer(struct thread *thread)
/* Hello timer set. */
ei->t_hello = NULL;
thread_add_timer(master, eigrp_hello_timer, ei,
- EIGRP_IF_PARAM(ei, v_hello), &ei->t_hello);
+ ei->params.v_hello, &ei->t_hello);
return 0;
}
@@ -600,7 +600,7 @@ static u_int16_t eigrp_hello_parameter_encode(struct eigrp_interface *ei,
}
// and set hold time value..
- stream_putw(s, IF_DEF_PARAMS(ei->ifp)->v_wait);
+ stream_putw(s, ei->params.v_wait);
return length;
}
@@ -637,12 +637,12 @@ static struct eigrp_packet *eigrp_hello_encode(struct eigrp_interface *ei,
eigrp_packet_header_init(EIGRP_OPC_HELLO, ei->eigrp, ep->s, 0, 0, ack);
// encode Authentication TLV
- if ((IF_DEF_PARAMS(ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5)
- && (IF_DEF_PARAMS(ei->ifp)->auth_keychain != NULL)) {
+ if ((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
+ && (ei->params.auth_keychain != NULL)) {
length += eigrp_add_authTLV_MD5_to_stream(ep->s, ei);
- } else if ((IF_DEF_PARAMS(ei->ifp)->auth_type
+ } else if ((ei->params.auth_type
== EIGRP_AUTH_TYPE_SHA256)
- && (IF_DEF_PARAMS(ei->ifp)->auth_keychain != NULL)) {
+ && (ei->params.auth_keychain != NULL)) {
length += eigrp_add_authTLV_SHA256_to_stream(ep->s, ei);
}
@@ -676,13 +676,13 @@ static struct eigrp_packet *eigrp_hello_encode(struct eigrp_interface *ei,
// set soruce address for the hello packet
ep->dst.s_addr = addr;
- if ((IF_DEF_PARAMS(ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5)
- && (IF_DEF_PARAMS(ei->ifp)->auth_keychain != NULL)) {
+ if ((ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
+ && (ei->params.auth_keychain != NULL)) {
eigrp_make_md5_digest(ei, ep->s,
EIGRP_AUTH_BASIC_HELLO_FLAG);
- } else if ((IF_DEF_PARAMS(ei->ifp)->auth_type
+ } else if ((ei->params.auth_type
== EIGRP_AUTH_TYPE_SHA256)
- && (IF_DEF_PARAMS(ei->ifp)->auth_keychain != NULL)) {
+ && (ei->params.auth_keychain != NULL)) {
eigrp_make_sha256_digest(ei, ep->s,
EIGRP_AUTH_BASIC_HELLO_FLAG);
}