Set Route.Network to "network" and Router.Gateway to network.Address

This commit is contained in:
Milos Gajdos 2019-08-23 16:01:57 +01:00
parent 8c3eec9f2a
commit 9448d7c164
No known key found for this signature in database
GPG Key ID: 8B31058CC55DFD4F

View File

@ -226,8 +226,8 @@ func (n *network) advertise(client transport.Client, advertChan <-chan *router.A
route := &pb.Route{ route := &pb.Route{
Service: event.Route.Service, Service: event.Route.Service,
Address: event.Route.Address, Address: event.Route.Address,
Gateway: event.Route.Gateway, Gateway: n.options.Address,
Network: event.Route.Network, Network: "network",
Link: event.Route.Link, Link: event.Route.Link,
Metric: int64(event.Route.Metric), Metric: int64(event.Route.Metric),
} }
@ -257,6 +257,7 @@ func (n *network) advertise(client transport.Client, advertChan <-chan *router.A
}, },
Body: body, Body: body,
} }
if err := client.Send(&m); err != nil { if err := client.Send(&m); err != nil {
log.Debugf("Network failed to send advert %s: %v", pbAdvert.Id, err) log.Debugf("Network failed to send advert %s: %v", pbAdvert.Id, err)
continue continue