diff --git a/dns/router.go b/dns/router.go index e62f0ef51..ae9e68c7e 100644 --- a/dns/router.go +++ b/dns/router.go @@ -386,12 +386,7 @@ func (r *Router) Lookup(ctx context.Context, domain string, options adapter.DNSQ if rule != nil { switch action := rule.Action().(type) { case *R.RuleActionReject: - switch action.Method { - case C.RuleActionRejectMethodDefault: - return nil, nil - case C.RuleActionRejectMethodDrop: - return nil, tun.ErrDrop - } + return nil, &R.RejectedError{Cause: action.Error(ctx)} case *R.RuleActionPredefined: if action.Rcode != mDNS.RcodeSuccess { err = RcodeError(action.Rcode)