mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
netlink: fix NOINET6 build.
Reported by: Michael Paepcke <bugs.fbsd@paepcke.de> PR: 269787 MFC after: 3 days
This commit is contained in:
parent
9d7cc536e2
commit
efeb800311
|
@ -836,16 +836,20 @@ nhop_set_blackhole(struct nhop_object *nh, int blackhole_rt_flag)
|
|||
bzero(&nh->gw_sa, sizeof(nh->gw_sa));
|
||||
|
||||
switch (nh->nh_priv->nh_upper_family) {
|
||||
#ifdef INET
|
||||
case AF_INET:
|
||||
nh->gw4_sa.sin_family = AF_INET;
|
||||
nh->gw4_sa.sin_len = sizeof(struct sockaddr_in);
|
||||
nh->gw4_sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||
break;
|
||||
#endif
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
nh->gw6_sa.sin6_family = AF_INET6;
|
||||
nh->gw6_sa.sin6_len = sizeof(struct sockaddr_in6);
|
||||
nh->gw6_sa.sin6_addr = in6addr_loopback;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue