Actions
Bug #10724
closedAllowed Hostnames adds/deletes only one A entry
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
Updated by Viktor Gurov over 4 years ago
Updated by Jim Pingle over 4 years ago
- Status changed from New to Pull Request Review
- Target version set to 2.5.0
Updated by Renato Botelho over 4 years 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!
Updated by Viktor Gurov over 4 years ago
- Status changed from Feedback to Resolved
works as expected on 2.5.0.a.20200709.1250
Actions