Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2023 10:36:09 GMT
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 7af6e00d62f3 - stable/13 - netlink: fix NOINET6 build.
Message-ID:  <202302271036.31RAa9JU075597@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by melifaro:

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

commit 7af6e00d62f3ba75c91146015724b44a05567efe
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-27 10:29:53 +0000

    netlink: fix NOINET6 build.
    
    Reported by:    Michael Paepcke <bugs.fbsd@paepcke.de>
    PR:             269787
    MFC after:      3 days
    
    (cherry picked from commit efeb8003117073d29bf82c8a69e036b8dbd78352)
---
 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 390e5eddd496..b92977ca42b0 100644
--- a/sys/net/route/nhop_ctl.c
+++ b/sys/net/route/nhop_ctl.c
@@ -835,16 +835,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
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302271036.31RAa9JU075597>