Project

General

Profile

Actions

Bug #7719

closed

Dynamic DNS updates not working on interface failover

Added by Jorge Albarenque over 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Category:
Gateways
Target version:
Start date:
07/24/2017
Due date:
% Done:

100%

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

Description

I realized that dynamic DNS hostnames are not being updated on interface failover. When manually marking a gateway as "down" everything works fine, but not when the interface actually goes down on its own. I think I tracked down the root cause:

When an interface in a gateway group fails, and this gateway group is tied to a dynamic DNS configuration, rc.dyndns.update is called with the user defined interface name as a parameter.

Within that script, lookup_gateway_interface_by_name() converts the user defined name to the friendly interface name (eg "wan") and this is passed to services_dyndns_configure()

The problem is that services_dyndns_configure() looks designed to accept not the friendly interface name ("friendlyiface") but the real interface name ("interface"), since it ends up comparing to the 'interface' item of return_gateway_groups_array()

In my case, for example, executing:

services_dyndns_configure(wan)

on the PHP console does not do anything, while

services_dyndns_configure(bge_vlan1)

triggers the proper dynamic DNS update.

---
On the other hand, when you manually mark a gateway as down, the script is set to refresh all configs and that's why it works fine:

Jul 24 17:46:34 check_reload_status Updating all dyndns
---

I know this has previously worked at some point, so I don't know if this is a regression, or when it occured.

Actions

Also available in: Atom PDF