Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client name couldn't be resolved via rDNS if client has 2 names #1230

Closed
0xERR0R opened this issue Dec 4, 2019 · 0 comments
Closed

Client name couldn't be resolved via rDNS if client has 2 names #1230

0xERR0R opened this issue Dec 4, 2019 · 0 comments
Assignees
Milestone

Comments

@0xERR0R
Copy link

0xERR0R commented Dec 4, 2019

Issue Details

  • Version of AdGuard Home server:
    • v0.99.3

Expected Behavior

If client has 2 names, one name (first or last) should be shown in Top Clients view

Actual Behavior

Only IP address will be shown

Details

I have FritzBox as router. I defined custom name for my laptop in Fritzbox UI. If i run reverse DNS against FritzBox, i get both names (manual defined and host name). AdGuard home retrieves both names als PTR record. In rdns.go there is a following check:

if len(resp.Answer) != 1 {
		log.Debug("No answer for rDNS lookup of %s", ip)
		return ""
	}

I think, this should be "==0".

Additional Information

Log file:

2019/12/04 21:21:55 1#65 [debug] github.com/AdguardTeam/dnsproxy/proxy.(*Proxy).logDNSMessage(): OUT: ;; opcode: QUERY, status: NOERROR, id: 33627                                                                              
adguard    | ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 3                                                                                                                                                         
adguard    |                                                                                                                                                                                                                                 
adguard    | ;; QUESTION SECTION:                                                                                                                                                                                                            
adguard    | ;29.178.168.192.in-addr.arpa.      IN       PTR                                                                                                                                                                                 
adguard    |                                                                                                                                                                                                                                 
adguard    | ;; ANSWER SECTION:                                                                                                                                                                                                              
adguard    | 29.178.168.192.in-addr.arpa.       9       IN      PTR     dell.fritz.box.                                                                                                                                                      
adguard    | 29.178.168.192.in-addr.arpa.       9       IN      PTR     Laptop-D.fritz.box.                                                                                                                                                  
adguard    |                                                                                                                                                                                                                                 
adguard    | ;; AUTHORITY SECTION:                                                                                                                                                                                                           
adguard    | 29.178.168.192.in-addr.arpa.       9       IN      NS      fritz.box.                                                                                                                                                           
adguard    |                                                                                                                                                                                                                                 
adguard    | ;; ADDITIONAL SECTION:                                                                                                                                                                                                          
adguard    | fritz.box. 9       IN      A       192.168.178.1                                                                                                                                                                                
adguard    | fritz.box. 9       IN      AAAA    fd00::ca0e:14ff:fe13:c3a6                                                                                                                                                                    
adguard    | fritz.box. 9       IN      AAAA    2a02:590:30a:4e00:ca0e:14ff:fe13:c3a6                                                                                                                                                        
adguard    |                                                                                                                                                                                                                                 
adguard    | 2019/12/04 21:21:55 1#11 [debug] No answer for rDNS lookup of 192.168.178.29                
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants