net: routing table attach never fails

This commit is contained in:
Gleb Smirnoff 2025-12-04 11:12:03 -08:00
parent 27ff90cd3d
commit c7f05ef824
3 changed files with 1 additions and 11 deletions

View file

@ -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;
}
}

View file

@ -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;

View file

@ -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;