diff --git a/intra/protect/icmplistener.go b/intra/protect/icmplistener.go index 44f8947f..b82c178d 100644 --- a/intra/protect/icmplistener.go +++ b/intra/protect/icmplistener.go @@ -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() diff --git a/intra/protect/xdial.go b/intra/protect/xdial.go index 1178f253..a1ad38ec 100644 --- a/intra/protect/xdial.go +++ b/intra/protect/xdial.go @@ -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