mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-07 08:07:42 +00:00
wgengine/magicsock: remember fixed port number preference
So LinkChange events rebind to the same port when possible.
This commit is contained in:
parent
c763901b1a
commit
525bf1f3d2
@ -140,6 +140,7 @@ func Listen(opts Options) (*Conn, error) {
|
|||||||
epUpdateCtx, epUpdateCancel := context.WithCancel(context.Background())
|
epUpdateCtx, epUpdateCancel := context.WithCancel(context.Background())
|
||||||
c := &Conn{
|
c := &Conn{
|
||||||
pconn: new(RebindingUDPConn),
|
pconn: new(RebindingUDPConn),
|
||||||
|
pconnPort: opts.Port,
|
||||||
donec: make(chan struct{}),
|
donec: make(chan struct{}),
|
||||||
stunServers: append([]string{}, opts.STUN...),
|
stunServers: append([]string{}, opts.STUN...),
|
||||||
startEpUpdate: make(chan struct{}, 1),
|
startEpUpdate: make(chan struct{}, 1),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user