Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Dec 2020 22:54:32 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r368651 - head/sys/netpfil/ipfw
Message-ID:  <202012142254.0BEMsW9D086967@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: melifaro
Date: Mon Dec 14 22:54:32 2020
New Revision: 368651
URL: https://svnweb.freebsd.org/changeset/base/368651

Log:
  Fix LINT-NOINET6 build after r368571.
  
  Reported by:	mjg

Modified:
  head/sys/netpfil/ipfw/ip_fw_table_algo.c

Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c
==============================================================================
--- head/sys/netpfil/ipfw/ip_fw_table_algo.c	Mon Dec 14 22:53:19 2020	(r368650)
+++ head/sys/netpfil/ipfw/ip_fw_table_algo.c	Mon Dec 14 22:54:32 2020	(r368651)
@@ -3935,16 +3935,24 @@ static int
 ta_find_kfib_tentry(void *ta_state, struct table_info *ti,
     ipfw_obj_tentry *tent)
 {
-	struct rtentry *rt;
+	struct rtentry *rt = NULL;
 	struct route_nhop_data rnd;
 	struct epoch_tracker et;
 	int error;
 
 	NET_EPOCH_ENTER(et);
-	if (tent->subtype == AF_INET) {
+
+	switch (tent->subtype) {
+#ifdef INET
+	case AF_INET:
 		rt = fib4_lookup_rt(ti->data, tent->k.addr, 0, 0, &rnd);
-	} else {
+		break;
+#endif
+#ifdef INET6
+	case AF_INET6:
 		rt = fib6_lookup_rt(ti->data, &tent->k.addr6, 0, 0, &rnd);
+		break;
+#endif
 	}
 	if (rt != NULL)
 		error = ta_dump_kfib_tentry_int(tent->subtype, rt, tent);



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