Project

General

Profile

Actions

Bug #10724

closed

Allowed Hostnames adds/deletes only one A entry

Added by Viktor Gurov over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Category:
Captive Portal
Target version:
Start date:
07/03/2020
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.5-p1
Affected Architecture:

Description

If you add a hostname on services_captiveportal_hostname.php page,
it adds only single IP (A entry) from DNS answer,

For example:
If you want to add yandex.ru to allowed hostnames, it adds only first IP from the DNS answer:

# dig a yandex.ru
...
;; ANSWER SECTION:
yandex.ru.              66    IN    A    77.88.55.50
yandex.ru.              66    IN    A    5.255.255.50
yandex.ru.              66    IN    A    77.88.55.88
yandex.ru.              66    IN    A    5.255.255.5 

this is caused by using gethostbyname() in captiveportal_allowedip_configure_entry()

after reboot, it populates ipfw tables with all IP addresses, because filterdns is used

The same error if you try to delete a host entry on services_captiveportal_hostname.php page -
gethostbyname() is used to search for IP, causing only the first IP address to be removed from table

Actions #2

Updated by Jim Pingle over 1 year ago

  • Status changed from New to Pull Request Review
  • Target version set to 2.5.0
Actions #3

Updated by Renato Botelho over 1 year 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!

Actions #4

Updated by Viktor Gurov over 1 year ago

  • Status changed from Feedback to Resolved

works as expected on 2.5.0.a.20200709.1250

Actions

Also available in: Atom PDF