mirror of
https://github.com/luscis/openlan.git
synced 2025-10-05 08:36:59 +08:00
fea: display protocol for prefix route.
This commit is contained in:
@@ -24,12 +24,13 @@ func (l Prefix) List(w http.ResponseWriter, r *http.Request) {
|
||||
routes, _ := libol.ListRoutes()
|
||||
for _, prefix := range routes {
|
||||
item := schema.PrefixRoute{
|
||||
Link: prefix.Link,
|
||||
Metric: prefix.Priority,
|
||||
Table: prefix.Table,
|
||||
Source: prefix.Src,
|
||||
NextHop: prefix.Gw,
|
||||
Prefix: prefix.Dst,
|
||||
Link: prefix.Link,
|
||||
Metric: prefix.Priority,
|
||||
Table: prefix.Table,
|
||||
Source: prefix.Src,
|
||||
NextHop: prefix.Gw,
|
||||
Prefix: prefix.Dst,
|
||||
Protocol: prefix.Protocol,
|
||||
}
|
||||
items = append(items, item)
|
||||
|
||||
|
Reference in New Issue
Block a user