From e0c822a1f3c9705c89cc431b2afab354bcfcc1c2 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Tue, 29 Sep 2015 18:57:12 -0500 Subject: Use the appropriate parent interface with gateway groups using CARP VIPs. Ticket #4990 --- etc/inc/dyndns.class | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index d1bc665..bbcb963 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -267,13 +267,20 @@ if ($this->_dnsVerboseLog) log_error("DynDNS ({$this->_dnsHost}): DynDns _update() starting."); - + + if (strstr($this->_dnsRequestIf, "_vip")) { + $parentif = link_carp_interface_to_parent($this->_dnsRequestIf); + $realparentif = convert_friendly_interface_to_real_interface_name($parentif); + } else { + $realparentif = $this->_dnsRequestIf; + } + if ($this->_dnsService != 'ods' and $this->_dnsService != 'route53 ') { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_USERAGENT, $this->_UserAgent); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); - curl_setopt($ch, CURLOPT_INTERFACE, 'if!' . $this->_dnsRequestIf); + curl_setopt($ch, CURLOPT_INTERFACE, 'if!' . $realparentif); curl_setopt($ch, CURLOPT_TIMEOUT, 120); // Completely empirical } -- cgit v1.1