tstest/natlab: unregister conn4 if registration of conn6 fails.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson 2020-07-03 02:27:31 +00:00
parent d7bc4ec029
commit d94593e884

View File

@ -456,6 +456,7 @@ func (m *Machine) ListenPacket(network, address string) (net.PacketConn, error)
return nil, err
}
if err := m.registerConn6(c); err != nil {
m.unregisterConn4(c)
return nil, err
}
case 4: