Skip to content

Commit

Permalink
fix(noip): useproviderip and no ip returned case
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed May 6, 2024
1 parent 093e815 commit 542e895
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/provider/providers/noip/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ func (p *Provider) Update(ctx context.Context, client *http.Client, ip netip.Add
ips = ipextract.IPv6(s)
}

if !useProviderIP && len(ips) == 0 {
if len(ips) == 0 {
if useProviderIP {
// No returned ip address from noip server
return ip, nil
}
return netip.Addr{}, fmt.Errorf("%w", errors.ErrReceivedNoIP)
}

Expand Down

0 comments on commit 542e895

Please sign in to comment.