fix: revert previous change on IsValid() function; add validation in getUoTConnection();

This commit is contained in:
cty123 2023-07-18 22:11:09 +02:00 committed by yuhan6665
parent 2df418abf1
commit 7aeca33729
2 changed files with 4 additions and 1 deletions

View file

@ -11,6 +11,9 @@ import (
)
func (h *Handler) getUoTConnection(ctx context.Context, dest net.Destination) (stat.Connection, error) {
if dest.Address == nil {
return nil, newError("nil destination address")
}
if !dest.Address.Family().IsDomain() {
return nil, os.ErrInvalid
}