Skip to content

Commit

Permalink
protect: m code refs
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Oct 19, 2024
1 parent cc7a58c commit a2ceb84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions intra/protect/icmplistener.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func (ln *icmplistener) listenICMP(network, address string) (net.PacketConn, err
syscall.Close(s)
return nil, os.NewSyscallError("bind", err)
}
// why? github.com/golang/go/issues/15021#issuecomment-308562480
f := os.NewFile(uintptr(s), "datagram-oriented icmp")
c, cerr = net.FilePacketConn(f)
f.Close()
Expand Down
2 changes: 2 additions & 0 deletions intra/protect/xdial.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ type DialFn func(network, addr string) (net.Conn, error)

type RDialer interface {
// Handle uniquely identifies the concrete type backing this dialer.
// Useful as a phantom reference to this dialer.
// github.com/hashicorp/terraform/blob/325d18262/internal/configs/configschema/decoder_spec.go#L32
Handle() uintptr
// Dial creates a connection to the given address,
// the resulting net.Conn must be a *net.TCPConn if
Expand Down

0 comments on commit a2ceb84

Please sign in to comment.