summaryrefslogtreecommitdiffstats
path: root/eigrpd/eigrp_packet.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-06-15 21:24:20 +0200
committerRafael Zalamena <rzalamena@opensourcerouting.org>2019-08-07 03:42:31 +0200
commite78ebbd5c33d014141b9aac565c08eba67a7744d (patch)
treea480712192bf9ba0ebdcbd6a1014c4f8d04d1d29 /eigrpd/eigrp_packet.c
parenteigrpd: Convert eigrp_network.c to not use VRF_DEFAULT (diff)
downloadfrr-e78ebbd5c33d014141b9aac565c08eba67a7744d.tar.xz
frr-e78ebbd5c33d014141b9aac565c08eba67a7744d.zip
eigrpd: Convert eigrp_packet.c to not use VRF_DEFAULT
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'eigrpd/eigrp_packet.c')
-rw-r--r--eigrpd/eigrp_packet.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c
index f10317e3e..ba8271d46 100644
--- a/eigrpd/eigrp_packet.c
+++ b/eigrpd/eigrp_packet.c
@@ -77,11 +77,13 @@ const struct message eigrp_packet_type_str[] = {
static unsigned char zeropad[16] = {0};
/* Forward function reference*/
-static struct stream *eigrp_recv_packet(int, struct interface **,
- struct stream *);
-static int eigrp_verify_header(struct stream *, struct eigrp_interface *,
- struct ip *, struct eigrp_header *);
-static int eigrp_check_network_mask(struct eigrp_interface *, struct in_addr);
+static struct stream *eigrp_recv_packet(struct eigrp *eigrp, int fd,
+ struct interface **ifp,
+ struct stream *s);
+static int eigrp_verify_header(struct stream *s, struct eigrp_interface *ei,
+ struct ip *addr, struct eigrp_header *header);
+static int eigrp_check_network_mask(struct eigrp_interface *ei,
+ struct in_addr mask);
static int eigrp_retrans_count_exceeded(struct eigrp_packet *ep,
struct eigrp_neighbor *nbr)
@@ -495,7 +497,7 @@ int eigrp_read(struct thread *thread)
thread_add_read(master, eigrp_read, eigrp, eigrp->fd, &eigrp->t_read);
stream_reset(eigrp->ibuf);
- if (!(ibuf = eigrp_recv_packet(eigrp->fd, &ifp, eigrp->ibuf))) {
+ if (!(ibuf = eigrp_recv_packet(eigrp, eigrp->fd, &ifp, eigrp->ibuf))) {
/* This raw packet is known to be at least as big as its IP
* header. */
return -1;
@@ -706,7 +708,8 @@ int eigrp_read(struct thread *thread)
return 0;
}
-static struct stream *eigrp_recv_packet(int fd, struct interface **ifp,
+static struct stream *eigrp_recv_packet(struct eigrp *eigrp,
+ int fd, struct interface **ifp,
struct stream *ibuf)
{
int ret;
@@ -774,7 +777,7 @@ static struct stream *eigrp_recv_packet(int fd, struct interface **ifp,
ifindex = getsockopt_ifindex(AF_INET, &msgh);
- *ifp = if_lookup_by_index(ifindex, VRF_DEFAULT);
+ *ifp = if_lookup_by_index(ifindex, eigrp->vrf_id);
if (ret != ip_len) {
zlog_warn(