Fix NOINET[6] build by using af-independent route lookup function.

Reported by:	rpokala
This commit is contained in:
Alexander V. Chernikov 2020-05-11 20:41:03 +00:00
parent 9b5631807e
commit 1d1a743e9f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360921

View File

@ -402,10 +402,7 @@ typedef struct route sctp_route_t;
#define SCTP_RTALLOC(ro, vrf_id, fibnum) \
{ \
if ((ro)->ro_nh == NULL) { \
if ((ro)->ro_dst.sa_family == AF_INET) \
(ro)->ro_nh = fib4_lookup(fibnum, ((struct sockaddr_in *)&(ro)->ro_dst)->sin_addr, 0, NHR_REF, 0); \
if ((ro)->ro_dst.sa_family == AF_INET6) \
(ro)->ro_nh = fib6_lookup(fibnum, &((struct sockaddr_in6 *)&(ro)->ro_dst)->sin6_addr, 0, NHR_REF, 0); \
(ro)->ro_nh = rib_lookup(fibnum, &(ro)->ro_dst, NHR_REF, 0); \
} \
}