Description
Prerequisites
-
I have checked the Wiki and Discussions and found no answer
-
I have searched other issues and found no duplicates
-
I want to report a bug and not ask a question or ask for help
-
I have set up AdGuard Home correctly and configured clients to use it. (Use the Discussions for help with installing and configuring clients.)
Platform (OS and CPU architecture)
Linux, AMD64 (aka x86_64)
Installation
Docker
Setup
On one machine
AdGuard Home version
v0.107.38
Action
Inside the DNS Rewrites column, the table enables users to sort, which doesn't work properly.
Add 3 DNS Rewrite entries:
- a.example.com -> 10.1.1.3
- b.example.com -> 10.1.1.5
- c.example.com -> b.example.com
- d.example.com -> 10.1.1.1
Try sorting by the Answer column. The data is not sorted by .
Expected result
The table contents sorted in consistent way.
- CNAME entries sorted alphabetically
- IPv4 and IPv6 address sorted
- CNAME entries before or after IP addresses (doesn't matter which, as long as it is consistent)
Actual result
The table contents is not sorted in any particular order. The IPv4 and CNAME addresses are mixed together.
Additional information and/or screenshots
When trying to perform the sort, the JavaScript console complains:
I think the core of the issue is in here helpers.js:getAddressesComparisonBytes
function. It tries to parse the answer either as CIDR or IP address, when some of the values are CNAME. This causes an exception and sorting is dropped.