More plumbing

This commit is contained in:
Adam Ierymenko 2019-10-02 07:09:54 -07:00
commit b9911d0db7
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
18 changed files with 384 additions and 114 deletions

View file

@ -24,7 +24,7 @@ type Route struct {
Target net.IPNet
// Via is how to reach this target (null/empty if the target IP range is local to this virtual LAN)
Via net.IP
Via *net.IP
// Route flags (currently unused, always 0)
Flags uint16
@ -35,7 +35,7 @@ type Route struct {
// String returns a string representation of this route
func (r *Route) String() string {
if len(r.Via) == 0 {
if r.Via != nil {
return r.Target.String() + "->LAN"
}
return r.Target.String() + "->" + r.Via.String()