Fix obvious bugs

This commit is contained in:
Josh Deprez 2024-05-05 18:04:54 +10:00
parent 10d4610e0d
commit 95eec9564f
Signed by: josh
SSH key fingerprint: SHA256:zZji7w1Ilh2RuUpbQcqkLPrqmRwpiCSycbF2EfKm6Kw
2 changed files with 3 additions and 3 deletions

View file

@ -60,7 +60,7 @@ const routingTableTemplate = `
<tr>
<td>{{$route.NetStart}}{{if not (eq $route.NetStart $route.NetEnd)}} - {{$route.NetEnd}}{{end}}</td>
<td>{{if $route.Extended}}{{else}}-{{end}}</td>
<td>{{range $route.ZoneNames}}{{.}}<br>{{end}}</td>
<td>{{range $route.ZoneNames.ToSlice}}{{.}}<br>{{end}}</td>
<td>{{$route.Distance}}</td>
<td>{{$route.LastSeenAgo}}</td>
<td>

View file

@ -29,8 +29,8 @@ func (rt *RouteTable) AddZonesToNetwork(n ddp.Network, zs ...string) {
if n < r.NetStart || n > r.NetEnd {
continue
}
if !r.Valid() {
continue
if r.ZoneNames == nil {
r.ZoneNames = make(StringSet)
}
r.ZoneNames.Insert(zs...)
}