Project

General

Profile

Actions

Bug #1735

closed

Tinydns load balancing not working

Added by Heinrich Lee Yu about 14 years ago. Updated about 14 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
DNS Server
Target version:
-
Start date:
07/31/2011
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:

Description

When specifying extra IP addresses for failover and load balancing, failover works but load balancing doesnt.

Actually the behavior is very funny. Pfsense load balances when the failover IP is DOWN. Exactly the opposite of what you would want it to do.

I checked out the code and here's what I found:

/usr/local/pkg/tinydns.inc starting at line 557

if($row['loadbalance']) {
  if($row['pingthreshold'])
    $pingthreshold = $row['pingthreshold'];
  else
    $pingthreshold = "";
  if($row['wanpingthreshold'])
    $wanpingthreshold =     $row['wanpingthreshold'];
  else   
    $wanpingthreshold = "";
  $status = tinydns_get_record_status($row['failoverip'], $pingthreshold, $wanpingthreshold);
  if($status == "DOWN") {
    $record_data = tinydns_get_rowline_data($row['failoverip'], $domain['recordtype'], $ttl, $hostname, "", $domain['rdns'], $dist, $domain['src_port'], $d
omain['src_weight'], $domain['src_priority'], $domain['src_timestamp']);
    fwrite($fd, $record_data . "\n");
  }
}

I just changed DOWN to UP and everything works as it should.

Actions

Also available in: Atom PDF