From 21dc7bcccf4e8f9fd618fa7201d39d8b5b377718 Mon Sep 17 00:00:00 2001 From: Milos Gajdos Date: Tue, 17 Sep 2019 16:11:02 +0100 Subject: [PATCH] Fix gateway addressing - Set Gateway as node.ID when advertising - Set server.Address as node.ID to listen on - Set server.Advertise as node.Address --- network/default.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/network/default.go b/network/default.go index ac50c901..da685baf 100644 --- a/network/default.go +++ b/network/default.go @@ -87,7 +87,8 @@ func newNetwork(opts ...Option) Network { // server is network server server := server.NewServer( server.Id(options.Id), - server.Address(options.Address), + server.Address(options.Id), + server.Advertise(options.Address), server.Name(options.Name), server.Transport(tunTransport), ) @@ -639,7 +640,7 @@ func (n *network) advertise(client transport.Client, advertChan <-chan *router.A route := &pbRtr.Route{ Service: event.Route.Service, Address: event.Route.Address, - Gateway: n.node.address, + Gateway: n.node.id, Network: event.Route.Network, Router: event.Route.Router, Link: DefaultLink,