Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109790824
D24663.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
969 B
Referenced Files
None
Subscribers
None
D24663.diff
View Options
Index: head/sys/net/route/route_ddb.c
===================================================================
--- head/sys/net/route/route_ddb.c
+++ head/sys/net/route/route_ddb.c
@@ -208,6 +208,8 @@
_DB_FUNC(_show, route, db_show_route_cmd, db_show_table, CS_OWN, NULL)
{
char abuf[INET6_ADDRSTRLEN], *buf, *end;
+ struct rib_head *rh;
+ struct radix_node *rn;
void *dst_addrp;
struct rtentry *rt;
union {
@@ -244,8 +246,15 @@
if (inet_ntop(af, dst_addrp, abuf, sizeof(abuf)) != NULL)
db_printf("Looking up route to destination '%s'\n", abuf);
+ rt = NULL;
CURVNET_SET(vnet0);
- rt = rtalloc1((struct sockaddr *)&u, 0, RTF_RNH_LOCKED);
+
+ rh = rt_tables_get_rnh(RT_DEFAULT_FIB, af);
+
+ rn = rh->rnh_matchaddr(&u, &rh->head);
+ if (rn && ((rn->rn_flags & RNF_ROOT) == 0))
+ rt = (struct rtentry *)rn;
+
CURVNET_RESTORE();
if (rt == NULL) {
@@ -254,7 +263,6 @@
}
rt_dumpentry_ddb((void *)rt, NULL);
- RTFREE_LOCKED(rt);
return;
usage:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 10, 1:59 PM (6 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16578404
Default Alt Text
D24663.diff (969 B)
Attached To
Mode
D24663: Switch DDB show route to direct rnh_matchaddr() call instead of rtalloc1().
Attached
Detach File
Event Timeline
Log In to Comment