Unbreak LINT-NOINET[6] builds broken in r360191.

Reported by:	np
This commit is contained in:
Alexander V. Chernikov 2020-04-23 06:55:33 +00:00
parent 201ee4ae97
commit 9e88f47c8f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360217

View File

@ -30,6 +30,7 @@
__FBSDID("$FreeBSD$");
#include "opt_inet.h"
#include "opt_inet6.h"
#include <sys/param.h>
#include <sys/systm.h>
@ -76,12 +77,19 @@ tcp_offload_connect(struct socket *so, struct sockaddr *nam)
NET_EPOCH_ENTER(et);
nh = NULL;
#ifdef INET
if (nam->sa_family == AF_INET)
nh = fib4_lookup(0, ((struct sockaddr_in *)nam)->sin_addr,
NHR_NONE, 0, 0);
else if (nam->sa_family == AF_INET6)
#endif
#if defined(INET) && defined(INET6)
else
#endif
#ifdef INET6
if (nam->sa_family == AF_INET6)
nh = fib6_lookup(0, &((struct sockaddr_in6 *)nam)->sin6_addr,
NHR_NONE, 0, 0);
#endif
if (nh == NULL) {
NET_EPOCH_EXIT(et);
return (EHOSTUNREACH);