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));
|
bzero(&nh->gw_sa, sizeof(nh->gw_sa));
|
||||||
|
|
||||||
switch (nh->nh_priv->nh_upper_family) {
|
switch (nh->nh_priv->nh_upper_family) {
|
||||||
|
#ifdef INET
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
nh->gw4_sa.sin_family = AF_INET;
|
nh->gw4_sa.sin_family = AF_INET;
|
||||||
nh->gw4_sa.sin_len = sizeof(struct sockaddr_in);
|
nh->gw4_sa.sin_len = sizeof(struct sockaddr_in);
|
||||||
nh->gw4_sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
nh->gw4_sa.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef INET6
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
nh->gw6_sa.sin6_family = AF_INET6;
|
nh->gw6_sa.sin6_family = AF_INET6;
|
||||||
nh->gw6_sa.sin6_len = sizeof(struct sockaddr_in6);
|
nh->gw6_sa.sin6_len = sizeof(struct sockaddr_in6);
|
||||||
nh->gw6_sa.sin6_addr = in6addr_loopback;
|
nh->gw6_sa.sin6_addr = in6addr_loopback;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user