mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 18:48:49 -04:00
fix(noip): useproviderip and no ip returned case
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user