summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_update.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_update.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_update.c')
-rw-r--r--eigrpd/eigrp_update.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c
index baa1ac553..125a230e7 100644
--- a/eigrpd/eigrp_update.c
+++ b/eigrpd/eigrp_update.c
@@ -434,8 +434,8 @@ void eigrp_update_send_init(struct eigrp_neighbor *nbr)
nbr->recv_sequence_number);
// encode Authentication TLV, if needed
- if ((IF_DEF_PARAMS(nbr->ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5)
- && (IF_DEF_PARAMS(nbr->ei->ifp)->auth_keychain != NULL)) {
+ if ((nbr->ei->params.auth_type == EIGRP_AUTH_TYPE_MD5)
+ && (nbr->ei->params.auth_keychain != NULL)) {
length += eigrp_add_authTLV_MD5_to_stream(ep->s, nbr->ei);
eigrp_make_md5_digest(nbr->ei, ep->s,
EIGRP_AUTH_UPDATE_INIT_FLAG);
@@ -467,8 +467,8 @@ static void eigrp_update_place_on_nbr_queue(struct eigrp_neighbor *nbr,
u_int32_t seq_no,
int length)
{
- if((IF_DEF_PARAMS (nbr->ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5) &&
- (IF_DEF_PARAMS (nbr->ei->ifp)->auth_keychain != NULL)) {
+ if((nbr->ei->params.auth_type == EIGRP_AUTH_TYPE_MD5) &&
+ (nbr->ei->params.auth_keychain != NULL)) {
eigrp_make_md5_digest(nbr->ei,ep->s, EIGRP_AUTH_UPDATE_FLAG);
}
@@ -544,8 +544,8 @@ void eigrp_update_send_EOT(struct eigrp_neighbor *nbr)
seq_no, nbr->recv_sequence_number);
// encode Authentication TLV, if needed
- 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);
}
@@ -564,8 +564,8 @@ void eigrp_update_send_EOT(struct eigrp_neighbor *nbr)
ep->s, EIGRP_EOT_FLAG,
seq_no, nbr->recv_sequence_number);
- 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);
}
@@ -610,8 +610,8 @@ void eigrp_update_send(struct eigrp_interface *ei)
ep->s, 0, seq_no, 0);
// encode Authentication TLV, if needed
- 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);
}
@@ -628,8 +628,8 @@ void eigrp_update_send(struct eigrp_interface *ei)
continue;
if ((length + 0x001D) > (u_int16_t)ei->ifp->mtu) {
- 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_UPDATE_FLAG);
}
@@ -646,8 +646,8 @@ void eigrp_update_send(struct eigrp_interface *ei)
ep = eigrp_packet_new(ei->ifp->mtu, NULL);
eigrp_packet_header_init(EIGRP_OPC_UPDATE, eigrp,
ep->s, 0, seq_no, 0);
- 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);
}
has_tlv = 0;
@@ -672,8 +672,8 @@ void eigrp_update_send(struct eigrp_interface *ei)
return;
}
- 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_UPDATE_FLAG);
}
@@ -790,8 +790,8 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
nbr->recv_sequence_number);
// encode Authentication TLV, if needed
- 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);
}
@@ -856,8 +856,8 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
}
/* compute Auth digest */
- 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_UPDATE_FLAG);
}