Project

General

Profile

Bug #8014

DynDNS wildcard option doesn't work for provider Loopia

Added by Kristoffer Ekenstam about 2 years ago. Updated 2 months ago.

Status:
Feedback
Priority:
Normal
Category:
Dynamic DNS
Target version:
Start date:
10/26/2017
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.1
Affected Architecture:

Description

The DynDNS wildcard option doesn't work for provider Loopia.

It seems that this line never results in $this->_dnsWildcard being set to "ON":

if (isset($this->_dnsWildcard) && $this->_dnsWildcard != "OFF") $this->_dnsWildcard = "ON";

The same check is done for many providers, so maybe this problem doesn't only affect Loopia.

Here's a fix for Loopia, that works for me at least:

case 'loopia':
    $needsIP = TRUE;
    if(isset($this->_dnsWildcard) && $this->_dnsWildcard == TRUE) {
        $this->_dnsWildcard = "ON";
    }
    else {
        $this->_dnsWildcard = "OFF";
    }
    curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
    curl_setopt($ch, CURLOPT_URL, 'https://dyndns.loopia.se/?system=custom&hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP . '&wildcard=' . $this->_dnsWildcard . '&mx=' . $this->_dnsMX . '&backmx=NO');
    break;

Please note that the host(CURLOPT_URL) is changed to https://dyndns.loopia.se, as stated on Loopia's support page:
https://translate.google.se/translate?sl=sv&tl=en&js=y&prev=_t&hl=sv&ie=UTF-8&u=https%3A%2F%2Fsupport.loopia.se%2Fwiki%2Fom-dyndns-stodet%2F&edit-text=

Also reported in this forum thread:
https://forum.pfsense.org/index.php?topic=138826.0

Associated revisions

Revision cedc8184 (diff)
Added by kristoffer-ekenstam 3 months ago

Fixed #8014

Fixed wildcard variable not being set correctly.
Updated CURLOPT_URL according to provider's documentation.
Added support for MX records.

Revision 15d4aede (diff)
Added by kristoffer-ekenstam about 2 months ago

Fixed #8014

Fixed wildcard variable not being set correctly.
Updated CURLOPT_URL according to provider's documentation.
Added support for MX records.

(cherry picked from commit cedc8184606a4cfdf6cb7542e43d205205005865)

History

#1 Updated by Jim Pingle 3 months ago

  • Status changed from New to Resolved

PR was merged a long time ago.
https://github.com/pfsense/pfsense/pull/3753

#2 Updated by Kristoffer Ekenstam 3 months ago

PR 3753 didn't solve this problem, have checked the latest version.

$this->_dnsWildcard is either ON or 1. Never OFF.
CURLOPT_URL needs to be updated.

The solution above also adds support for MX records.

#3 Updated by Jim Pingle 3 months ago

  • Status changed from Resolved to New

OK, can you submit that change as a pull request on Github then? Thanks!

https://docs.netgate.com/pfsense/en/latest/development/submitting-a-pull-request-via-github.html

#5 Updated by Jim Pingle 3 months ago

  • Target version set to 2.5.0

Thanks!

#6 Updated by Jim Pingle 3 months ago

  • Status changed from New to Pull Request Review

#7 Updated by Renato Botelho 2 months ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Renato Botelho
  • % Done changed from 0 to 100

PR has been merged. Thanks!

Also available in: Atom PDF