diff --git a/netstack/src/scheme/netcfg/mod.rs b/netstack/src/scheme/netcfg/mod.rs index 0b00a33d6b..9963497519 100644 --- a/netstack/src/scheme/netcfg/mod.rs +++ b/netstack/src/scheme/netcfg/mod.rs @@ -266,6 +266,17 @@ fn mk_root_node( format!("routes: {}\n", count) } }, + "gateway" => { + ro [route_table] || { + let table = route_table.borrow(); + let zero: IpAddress = IpAddress::v4(0, 0, 0, 0); + let gw = table.lookup_gateway(&zero); + match gw { + Some(addr) => format!("default via {}\n", addr), + None => "no default route\n".to_string(), + } + } + }, "add" => { wo [iface, notifier, route_table] (Option, None) |cur_value, line| {