ipn/ipnlocal: fix netstack peerapi crash over IPv6

The peerapi IPv6 listener has a nil listener.
But we didn't need the listener's address anyway, so don't
try to use it.

Change-Id: I8e8a1a895046d129a3683973e732d9bed82f3b02
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/6580/head
Brad Fitzpatrick 1 year ago committed by Brad Fitzpatrick
parent f1ab11e961
commit 5bdca747b7

@ -530,7 +530,7 @@ func (pln *peerAPIListener) ServeConn(src netip.AddrPort, c net.Conn) {
if addH2C != nil {
addH2C(httpServer)
}
go httpServer.Serve(netutil.NewOneConnListener(c, pln.ln.Addr()))
go httpServer.Serve(netutil.NewOneConnListener(c, nil))
}
// peerAPIHandler serves the PeerAPI for a source specific client.

Loading…
Cancel
Save