Project

General

Profile

Actions

Bug #3858

closed

DynDNS errno 47: Address family not supported by protocol family

Added by Robbie Trencheny about 10 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
Dynamic DNS
Target version:
Start date:
09/11/2014
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:

Description

I'm on pfSense 2.1.3-RELEASE amd64 (seems to be missing from affected version). Upon configuring the custom (v4, not v6, although v6 had the same issue) DynDNS service, I was met with the following in my logs (when verbose logging was enabled, and yes, I masked the full script URL and my IP address):

Sep 10 23:14:41    php: /services_dyndns_edit.php: DynDns: updatedns() starting
Sep 10 23:14:41    php: /services_dyndns_edit.php: DynDns (): XX.XXX.XX.XXX extracted from local system.
Sep 10 23:14:41    php: /services_dyndns_edit.php: DynDNS (): running get_failover_interface for wan. found em1
Sep 10 23:14:41    php: /services_dyndns_edit.php: DynDNS (): DynDns _update() starting.
Sep 10 23:14:41    php: /services_dyndns_edit.php: Custom DDNS (): DNS update() starting.
Sep 10 23:14:41    php: /services_dyndns_edit.php: Sending request to: http://myhost.example.com/dyndns/index.php?type=v4&ip=67.169.59.123
Sep 10 23:14:41    php: /services_dyndns_edit.php: DynDNS (): DynDns _checkStatus() starting.
Sep 10 23:14:41    php: /services_dyndns_edit.php: DynDNS (): Current Service: custom
Sep 10 23:14:41    php: /services_dyndns_edit.php: Curl error occurred: bind failed with errno 47: Address family not supported by protocol family

and the request would fail to complete. I started digging around, and found that if I commented line 277 (https://github.com/pfsense/pfsense/blob/master/etc/inc/dyndns.class#L277) of /etc/inc/dyndns.class, the request would complete. I checked the output of $this->_dnsRequestIfIP and found that it correctly output the IPv4 address assigned to my em1 interface (I only have a simple single WAN/single LAN setup). I checked the PHP Curl documentation, which stated that CURLOPT_INTERFACE will accept an IP address or interface name. I tried giving it em1 instead of the IP address provided in $this->_dnsRequestIfIP but that hung the webconfigurator.

So, current easiest fix is commenting line 277, because PHP is unable to send the request if bound to a specific interface.

Actions

Also available in: Atom PDF