git: c7f05ef82478 - main - net: routing table attach never fails
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 04 Dec 2025 19:12:13 UTC
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;