mirror of
https://github.com/tailscale/tailscale.git
synced 2026-05-05 12:16:44 +02:00
Update todos
This commit is contained in:
parent
16b8233459
commit
da8b9adc51
@ -1243,6 +1243,7 @@ func (c *Direct) CustomPing(mr *tailcfg.MapResponse) bool {
|
||||
start := time.Now()
|
||||
// Run the ping
|
||||
var pingRes *ipnstate.PingResult
|
||||
|
||||
c.pinger.Ping(ip, true, func(res *ipnstate.PingResult) {
|
||||
log.Println("Callback", res, (res.NodeIP))
|
||||
pingRes = res
|
||||
@ -1251,6 +1252,7 @@ func (c *Direct) CustomPing(mr *tailcfg.MapResponse) bool {
|
||||
log.Println("Successful PING!")
|
||||
}
|
||||
})
|
||||
|
||||
log.Println("PINGRES", pingRes)
|
||||
duration := time.Since(start)
|
||||
// Send the data to the handler in api.go admin/api/ping
|
||||
@ -1260,7 +1262,6 @@ func (c *Direct) CustomPing(mr *tailcfg.MapResponse) bool {
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
// time.Sleep(time.Millisecond * 100)
|
||||
resp, err := c.httpc.Do(request)
|
||||
if err != nil {
|
||||
return false
|
||||
|
||||
@ -59,6 +59,7 @@ func TestMain(m *testing.M) {
|
||||
fmt.Fprintf(os.Stderr, "FAIL: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
time.Sleep(5 * time.Second)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
||||
@ -269,6 +269,7 @@ func (s *Server) CompleteAuth(authPathOrURL string) bool {
|
||||
}
|
||||
|
||||
func (s *Server) serveRegister(w http.ResponseWriter, r *http.Request, mkey tailcfg.MachineKey) {
|
||||
log.Println("SERVE REGISTER CALLED")
|
||||
var req tailcfg.RegisterRequest
|
||||
if err := s.decode(mkey, r.Body, &req); err != nil {
|
||||
panic(fmt.Sprintf("serveRegister: decode: %v", err))
|
||||
@ -719,3 +720,8 @@ func (s *Server) receivePingInfo(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(200)
|
||||
io.WriteString(w, "Ping Streamed Back : "+string(reqBody))
|
||||
}
|
||||
|
||||
// TODO
|
||||
// We want it such that we can add a pingrequest to a mapresponse instead of hard coding it.
|
||||
func (s *Server) AddPingRequest() {
|
||||
}
|
||||
|
||||
@ -1198,7 +1198,8 @@ func (e *userspaceEngine) sendTSMPPing(ip netaddr.IP, peer *tailcfg.Node, res *i
|
||||
|
||||
var data [8]byte
|
||||
crand.Read(data[:])
|
||||
log.Println("CRAND CHECK")
|
||||
log.Println("CRAND CHECKlog")
|
||||
fmt.Println("CRAND CHECKfmt")
|
||||
|
||||
expireTimer := time.AfterFunc(10*time.Second, func() {
|
||||
log.Println("CHECKEXPIRE")
|
||||
@ -1223,12 +1224,13 @@ func (e *userspaceEngine) sendTSMPPing(ip netaddr.IP, peer *tailcfg.Node, res *i
|
||||
log.Println("PAYLOADCHECK")
|
||||
|
||||
tsmpPing := packet.Generate(iph, tsmpPayload[:])
|
||||
log.Println("PACKETGEN")
|
||||
log.Println("PACKETGEN", string(tsmpPing), *res)
|
||||
e.tundev.InjectOutbound(tsmpPing)
|
||||
log.Println("TUNDEVINJECT")
|
||||
}
|
||||
|
||||
func (e *userspaceEngine) setTSMPPongCallback(data [8]byte, cb func(packet.TSMPPongReply)) {
|
||||
log.Println("Ponger2nolock")
|
||||
e.mu.Lock()
|
||||
log.Println("Ponger2", e.pongCallback == nil, cb == nil)
|
||||
defer e.mu.Unlock()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user