aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2025-12-04 19:12:03 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2025-12-04 19:12:03 +0000
commitc7f05ef8247878c6cd565a71039ec49f202c22fd (patch)
tree393c5d85159423b9866484f0fdb936a3390d580b
parent27ff90cd3d8d2ac8198f30cbebeefb15a49d41bc (diff)
net: routing table attach never fails
-rw-r--r--sys/net/route/route_tables.c6
-rw-r--r--sys/netinet/in_rmx.c3
-rw-r--r--sys/netinet6/in6_rmx.c3
3 files changed, 1 insertions, 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;