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>
This commit is contained in:
Brad Fitzpatrick 2022-11-30 16:21:56 -08:00 committed by Brad Fitzpatrick
parent f1ab11e961
commit 5bdca747b7

View File

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