diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-06-15 15:24:20 -0400 | 
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2019-08-06 22:42:31 -0300 | 
| commit | e78ebbd5c33d014141b9aac565c08eba67a7744d (patch) | |
| tree | a480712192bf9ba0ebdcbd6a1014c4f8d04d1d29 /eigrpd/eigrp_packet.c | |
| parent | d0ac2662ac28a0e90bb2fd3a3aeed5bca197f80e (diff) | |
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.c | 19 | 
1 files changed, 11 insertions, 8 deletions
diff --git a/eigrpd/eigrp_packet.c b/eigrpd/eigrp_packet.c index f10317e3e5..ba8271d46e 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(  | 
