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
This commit is contained in:
parent
a811b4be3d
commit
21dc7bcccf
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user