Skip to content

Commit 37af960

Browse files
committed
backend: m todo code comments
1 parent a8b85ee commit 37af960

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

intra/backend/core_iptree.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import (
1717
"github.com/k-sone/critbitgo"
1818
)
1919

20+
// todo: use github.com/gaissmai/bart ?
21+
2022
// A IpTree is a thread-safe trie that supports insertion, deletion, and route matching IP CIDRs.
2123
type IpTree interface {
2224
// Adds value v to the cidr route.

intra/core/ping.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ func Ping(pc net.PacketConn, ipp netip.AddrPort) (ok bool, rtt time.Duration, er
8484
case *icmp.Echo:
8585
// IDs will never match for userspace icmp
8686
// github.com/go-ping/ping/blob/caaf2b72e/utils_linux.go#L13
87+
// github.com/tailscale/tailscale/blob/43138c7a5c/cmd/stunstamp/stunstamp_linux.go#L77
8788
// if reply.ID != msgid {
8889
// return fmt.Errorf("icmp: reply from [%v/%v] id %d; want %d",
8990
// ipp, from, reply.ID, msgid)
@@ -95,6 +96,8 @@ func Ping(pc net.PacketConn, ipp netip.AddrPort) (ok bool, rtt time.Duration, er
9596
}
9697

9798
start := bytesToTime(reply.Data[:tslen])
99+
// TODO: ref kernel timestamping
100+
// github.com/tailscale/tailscale/blob/43138c7a5c/cmd/stunstamp/stunstamp_linux.go#L279
98101
rtt = end.Sub(start)
99102
ok = true
100103
default:

0 commit comments

Comments
 (0)