git: efeb80031170 - main - netlink: fix NOINET6 build.

From: Alexander V. Chernikov <melifaro_at_FreeBSD.org>
Date: Fri, 24 Feb 2023 10:21:19 UTC
The branch main has been updated by melifaro:

URL: https://cgit.FreeBSD.org/src/commit/?id=efeb8003117073d29bf82c8a69e036b8dbd78352

commit efeb8003117073d29bf82c8a69e036b8dbd78352
Author:     Alexander V. Chernikov <melifaro@FreeBSD.org>
AuthorDate: 2023-02-24 10:19:12 +0000
Commit:     Alexander V. Chernikov <melifaro@FreeBSD.org>
CommitDate: 2023-02-24 10:21:06 +0000

    netlink: fix NOINET6 build.
    
    Reported by:    Michael Paepcke <bugs.fbsd@paepcke.de>
    PR:             269787
    MFC after:      3 days
---
 sys/net/route/nhop_ctl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c
index 73c34f675a04..d99b78351952 100644
--- a/sys/net/route/nhop_ctl.c
+++ b/sys/net/route/nhop_ctl.c
@@ -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
 	}
 }