Merge pull request #763 from milosgajdos83/gateway-addressing

Fix gateway addressing
This commit is contained in:
Asim Aslam 2019-09-17 16:27:35 +01:00 committed by GitHub
commit 837cb4fc11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,