summaryrefslogtreecommitdiffstats
path: root/eigrpd
diff options
context:
space:
mode:
Diffstat (limited to 'eigrpd')
-rw-r--r--eigrpd/eigrp_hello.c2
-rw-r--r--eigrpd/eigrp_packet.c6
-rw-r--r--eigrpd/eigrp_packet.h2
-rw-r--r--eigrpd/eigrp_query.c2
-rw-r--r--eigrpd/eigrp_reply.c2
-rw-r--r--eigrpd/eigrp_siaquery.c2
-rw-r--r--eigrpd/eigrp_siareply.c2
-rw-r--r--eigrpd/eigrp_update.c26
8 files changed, 23 insertions, 21 deletions
diff --git a/eigrpd/eigrp_hello.c b/eigrpd/eigrp_hello.c
index 67f75c536..d56767faf 100644
--- a/eigrpd/eigrp_hello.c
+++ b/eigrpd/eigrp_hello.c
@@ -618,7 +618,7 @@ static struct eigrp_packet *eigrp_hello_encode(struct eigrp_interface *ei,
if (ep) {
// encode common header feilds
- eigrp_packet_header_init(EIGRP_OPC_HELLO, ei, ep->s, 0, 0, ack);
+ 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)
diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c
index dde553d53..3b4a57ed5 100644
--- a/eigrpd/eigrp_packet.c
+++ b/eigrpd/eigrp_packet.c
@@ -877,7 +877,7 @@ void eigrp_packet_checksum(struct eigrp_interface *ei, struct stream *s,
}
/* Make EIGRP header. */
-void eigrp_packet_header_init(int type, struct eigrp_interface *ei,
+void eigrp_packet_header_init(int type, struct eigrp *eigrp,
struct stream *s, u_int32_t flags,
u_int32_t sequence, u_int32_t ack)
{
@@ -890,8 +890,8 @@ void eigrp_packet_header_init(int type, struct eigrp_interface *ei,
eigrph->opcode = (u_char)type;
eigrph->checksum = 0;
- eigrph->vrid = htons(ei->eigrp->vrid);
- eigrph->ASNumber = htons(ei->eigrp->AS);
+ eigrph->vrid = htons(eigrp->vrid);
+ eigrph->ASNumber = htons(eigrp->AS);
eigrph->ack = htonl(ack);
eigrph->sequence = htonl(sequence);
// if(flags == EIGRP_INIT_FLAG)
diff --git a/eigrpd/eigrp_packet.h b/eigrpd/eigrp_packet.h
index 040204a7f..03fe412f1 100644
--- a/eigrpd/eigrp_packet.h
+++ b/eigrpd/eigrp_packet.h
@@ -41,7 +41,7 @@ extern struct eigrp_packet *eigrp_packet_duplicate(struct eigrp_packet *,
struct eigrp_neighbor *);
extern void eigrp_packet_free(struct eigrp_packet *);
extern void eigrp_packet_delete(struct eigrp_interface *);
-extern void eigrp_packet_header_init(int, struct eigrp_interface *,
+extern void eigrp_packet_header_init(int, struct eigrp *,
struct stream *, u_int32_t, u_int32_t,
u_int32_t);
extern void eigrp_packet_checksum(struct eigrp_interface *, struct stream *,
diff --git a/eigrpd/eigrp_query.c b/eigrpd/eigrp_query.c
index d6299ad92..3bca444ab 100644
--- a/eigrpd/eigrp_query.c
+++ b/eigrpd/eigrp_query.c
@@ -162,7 +162,7 @@ void eigrp_send_query(struct eigrp_interface *ei)
ep = eigrp_packet_new(ei->ifp->mtu, NULL);
/* Prepare EIGRP INIT UPDATE header */
- eigrp_packet_header_init(EIGRP_OPC_QUERY, ei, ep->s, 0,
+ eigrp_packet_header_init(EIGRP_OPC_QUERY, ei->eigrp, ep->s, 0,
ei->eigrp->sequence_number, 0);
// encode Authentication TLV, if needed
diff --git a/eigrpd/eigrp_reply.c b/eigrpd/eigrp_reply.c
index 60390ad8a..e59db8039 100644
--- a/eigrpd/eigrp_reply.c
+++ b/eigrpd/eigrp_reply.c
@@ -113,7 +113,7 @@ void eigrp_send_reply(struct eigrp_neighbor *nbr, struct eigrp_prefix_entry *pe)
ep = eigrp_packet_new(nbr->ei->ifp->mtu, nbr);
/* Prepare EIGRP INIT UPDATE header */
- eigrp_packet_header_init(EIGRP_OPC_REPLY, nbr->ei, ep->s, 0,
+ eigrp_packet_header_init(EIGRP_OPC_REPLY, e, ep->s, 0,
nbr->ei->eigrp->sequence_number, 0);
// encode Authentication TLV, if needed
diff --git a/eigrpd/eigrp_siaquery.c b/eigrpd/eigrp_siaquery.c
index 215df7b8e..30f65ee87 100644
--- a/eigrpd/eigrp_siaquery.c
+++ b/eigrpd/eigrp_siaquery.c
@@ -126,7 +126,7 @@ void eigrp_send_siaquery(struct eigrp_neighbor *nbr,
ep = eigrp_packet_new(nbr->ei->ifp->mtu, nbr);
/* Prepare EIGRP INIT UPDATE header */
- eigrp_packet_header_init(EIGRP_OPC_SIAQUERY, nbr->ei, ep->s, 0,
+ eigrp_packet_header_init(EIGRP_OPC_SIAQUERY, nbr->ei->eigrp, ep->s, 0,
nbr->ei->eigrp->sequence_number, 0);
// encode Authentication TLV, if needed
diff --git a/eigrpd/eigrp_siareply.c b/eigrpd/eigrp_siareply.c
index 32f0c8be3..3050b9103 100644
--- a/eigrpd/eigrp_siareply.c
+++ b/eigrpd/eigrp_siareply.c
@@ -125,7 +125,7 @@ void eigrp_send_siareply(struct eigrp_neighbor *nbr,
ep = eigrp_packet_new(nbr->ei->ifp->mtu, nbr);
/* Prepare EIGRP INIT UPDATE header */
- eigrp_packet_header_init(EIGRP_OPC_SIAREPLY, nbr->ei, ep->s, 0,
+ eigrp_packet_header_init(EIGRP_OPC_SIAREPLY, nbr->ei->eigrp, ep->s, 0,
nbr->ei->eigrp->sequence_number, 0);
// encode Authentication TLV, if needed
diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c
index 8971635bf..7a7b1dd5d 100644
--- a/eigrpd/eigrp_update.c
+++ b/eigrpd/eigrp_update.c
@@ -471,9 +471,10 @@ void eigrp_update_send_init(struct eigrp_neighbor *nbr)
nbr->ei->eigrp->sequence_number,
nbr->recv_sequence_number);
- eigrp_packet_header_init(
- EIGRP_OPC_UPDATE, nbr->ei, ep->s, EIGRP_INIT_FLAG,
- nbr->ei->eigrp->sequence_number, nbr->recv_sequence_number);
+ eigrp_packet_header_init(EIGRP_OPC_UPDATE, nbr->ei->eigrp,
+ ep->s, EIGRP_INIT_FLAG,
+ nbr->ei->eigrp->sequence_number,
+ nbr->recv_sequence_number);
// encode Authentication TLV, if needed
if ((IF_DEF_PARAMS(nbr->ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5)
@@ -584,9 +585,9 @@ void eigrp_update_send_EOT(struct eigrp_neighbor *nbr)
ep = eigrp_packet_new(nbr->ei->ifp->mtu, nbr);
/* Prepare EIGRP EOT UPDATE header */
- eigrp_packet_header_init(EIGRP_OPC_UPDATE, nbr->ei, ep->s, EIGRP_EOT_FLAG,
- seq_no,
- nbr->recv_sequence_number);
+ eigrp_packet_header_init(EIGRP_OPC_UPDATE, nbr->ei->eigrp,
+ ep->s, EIGRP_EOT_FLAG,
+ seq_no, nbr->recv_sequence_number);
// encode Authentication TLV, if needed
if((IF_DEF_PARAMS (nbr->ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5) &&
@@ -606,7 +607,8 @@ void eigrp_update_send_EOT(struct eigrp_neighbor *nbr)
length = EIGRP_HEADER_LEN;
ep = eigrp_packet_new(nbr->ei->ifp->mtu, nbr);
- eigrp_packet_header_init(EIGRP_OPC_UPDATE, nbr->ei, ep->s, EIGRP_EOT_FLAG,
+ eigrp_packet_header_init(EIGRP_OPC_UPDATE, nbr->ei->eigrp,
+ ep->s, EIGRP_EOT_FLAG,
seq_no, nbr->recv_sequence_number);
if((IF_DEF_PARAMS (nbr->ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5) &&
@@ -674,8 +676,8 @@ void eigrp_update_send(struct eigrp_interface *ei)
ep = eigrp_packet_new(ei->ifp->mtu, NULL);
/* Prepare EIGRP INIT UPDATE header */
- eigrp_packet_header_init(EIGRP_OPC_UPDATE, ei, ep->s, 0,
- seq_no, 0);
+ eigrp_packet_header_init(EIGRP_OPC_UPDATE, ei->eigrp,
+ ep->s, 0, seq_no, 0);
// encode Authentication TLV, if needed
if ((IF_DEF_PARAMS(ei->ifp)->auth_type == EIGRP_AUTH_TYPE_MD5)
@@ -707,8 +709,8 @@ void eigrp_update_send(struct eigrp_interface *ei)
length = EIGRP_HEADER_LEN;
ep = eigrp_packet_new(ei->ifp->mtu, NULL);
- eigrp_packet_header_init(EIGRP_OPC_UPDATE, ei, ep->s, 0,
- seq_no, 0);
+ eigrp_packet_header_init(EIGRP_OPC_UPDATE, ei->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)) {
length += eigrp_add_authTLV_MD5_to_stream(ep->s, ei);
@@ -875,7 +877,7 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
ep = eigrp_packet_new(nbr->ei->ifp->mtu, nbr);
/* Prepare EIGRP Graceful restart UPDATE header */
- eigrp_packet_header_init(EIGRP_OPC_UPDATE, nbr->ei, ep->s, flags,
+ eigrp_packet_header_init(EIGRP_OPC_UPDATE, nbr->ei->eigrp, ep->s, flags,
nbr->ei->eigrp->sequence_number,
nbr->recv_sequence_number);