Set Route.Link to "network" not Route.Network. Oops!

This commit is contained in:
Milos Gajdos 2019-08-23 21:08:18 +01:00
parent 88e47b9b06
commit ed8d28c9ab
No known key found for this signature in database
GPG Key ID: 8B31058CC55DFD4F

View File

@ -223,12 +223,13 @@ func (n *network) advertise(client transport.Client, advertChan <-chan *router.A
// create a proto advert // create a proto advert
var events []*pb.Event var events []*pb.Event
for _, event := range advert.Events { for _, event := range advert.Events {
// NOTE: we override the Gateway and Link fields here
route := &pb.Route{ route := &pb.Route{
Service: event.Route.Service, Service: event.Route.Service,
Address: event.Route.Address, Address: event.Route.Address,
Gateway: n.options.Address, Gateway: n.options.Address,
Network: "network", Network: event.Route.Network,
Link: event.Route.Link, Link: "network",
Metric: int64(event.Route.Metric), Metric: int64(event.Route.Metric),
} }
e := &pb.Event{ e := &pb.Event{