diff options
-rw-r--r-- | eigrpd/eigrp_packet.c | 19 |
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( |