Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Dec 2025 19:12:13 +0000
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c7f05ef82478 - main - net: routing table attach never fails
Message-ID:  <6931dd0d.e570.2bdfe964@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by glebius:

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

commit c7f05ef8247878c6cd565a71039ec49f202c22fd
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-12-04 19:12:03 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-12-04 19:12:03 +0000

    net: routing table attach never fails
---
 sys/net/route/route_tables.c | 6 +-----
 sys/netinet/in_rmx.c         | 3 ---
 sys/netinet6/in6_rmx.c       | 3 ---
 3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c
index 3b7bb1385d0e..749ef063e125 100644
--- a/sys/net/route/route_tables.c
+++ b/sys/net/route/route_tables.c
@@ -254,11 +254,7 @@ grow_rtables(uint32_t num_tables)
 			if (*prnh != NULL)
 				continue;
 			rh = dom->dom_rtattach(i);
-			if (rh == NULL)
-				log(LOG_ERR, "unable to create routing table for %d.%d\n",
-				    dom->dom_family, i);
-			else
-				populate_kernel_routes(new_rt_tables, rh);
+			populate_kernel_routes(new_rt_tables, rh);
 			*prnh = rh;
 		}
 	}
diff --git a/sys/netinet/in_rmx.c b/sys/netinet/in_rmx.c
index b8599143b991..4a2dc9905d0a 100644
--- a/sys/netinet/in_rmx.c
+++ b/sys/netinet/in_rmx.c
@@ -119,9 +119,6 @@ in_inithead(uint32_t fibnum)
 	struct rib_head *rh;
 
 	rh = rt_table_init(32, AF_INET, fibnum);
-	if (rh == NULL)
-		return (NULL);
-
 	rh->rnh_set_nh_pfxflags = rib4_set_nh_pfxflags;
 	rh->rnh_augment_nh = rib4_augment_nh;
 
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index 6eb61600b8df..d1c121115b60 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -145,9 +145,6 @@ in6_inithead(uint32_t fibnum)
 
 	rh = rt_table_init(offsetof(struct sockaddr_in6, sin6_addr) << 3,
 	    AF_INET6, fibnum);
-	if (rh == NULL)
-		return (NULL);
-
 	rh->rnh_set_nh_pfxflags = rib6_set_nh_pfxflags;
 	rh->rnh_augment_nh = rib6_augment_nh;
 


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6931dd0d.e570.2bdfe964>