GNU bug report logs - #40343
28.0.50; dns-set-servers fails on IPv6 available Windows

Previous Next

Package: emacs;

Reported by: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>

Date: Tue, 31 Mar 2020 08:48:01 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 28.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Robert Pluim <rpluim <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#40343: closed (28.0.50; dns-set-servers fails on IPv6
 available Windows)
Date: Fri, 03 Apr 2020 15:20:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 03 Apr 2020 17:19:25 +0200
with message-id <m2v9mgwq9u.fsf <at> gmail.com>
and subject line Re: bug#40343: 28.0.50; dns-set-servers fails on IPv6 available Windows
has caused the debbugs.gnu.org bug report #40343,
regarding 28.0.50; dns-set-servers fails on IPv6 available Windows
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
40343: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40343
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; dns-set-servers fails on IPv6 available Windows
Date: Tue, 31 Mar 2020 17:46:47 +0900
dns-set-servers function fails to set dns-servers on Windows with IPv6
available network.

(progn
  (require 'dns)
  (dns-set-servers)
  dns-servers)

-> (nil)

The reason is that Windows's nslookup program returns server's IPv6
address if availeble but dns-set-servers function assumes that
server's address is always IPv4.

> C:\>nslookup localhost
> サーバー:  server.lan
> Address:  xxxx:xxxx:xxxx::1
>
> 名前:    localhost.lan
> Addresses:  ::1
>           127.0.0.1

# "サーバー" and "名前" are Japanese translations for "Server" and
# "Name", respectively.

From dns-set-servers definition in lisp/net/dns.el

> (re-search-forward
>  "^Address:[ \t]*\\([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\)" nil t)

-- 
Kazuhiro Ito


[Message part 3 (message/rfc822, inline)]
From: Robert Pluim <rpluim <at> gmail.com>
To: Kazuhiro Ito <kzhr <at> d1.dion.ne.jp>
Cc: 40343-done <at> debbugs.gnu.org
Subject: Re: bug#40343: 28.0.50; dns-set-servers fails on IPv6 available
 Windows
Date: Fri, 03 Apr 2020 17:19:25 +0200
>>>>> On Fri, 03 Apr 2020 23:08:10 +0900, Kazuhiro Ito <kzhr <at> d1.dion.ne.jp> said:

    >> Thanks for that. This should fix all those cases:
    Kazuhiro> Thank you for the patch.  It works well on Cygwin environment.  But I
    Kazuhiro> noticed different problems in dns-query when TCP is used.

Thanks for checking, pushed to master as 00f7744c1b

Closing the bug.

    Kazuhiro> 1. dns-write function needs to be called with TCP-P option.
    Kazuhiro> 2. First 2 bytes of received data (length field) should be truncated
    Kazuhiro> for dns-read function.  Or dns-read function should accept TCP-P
    Kazuhiro> option like dns-wrote function.

Indeed, looks like thatʼs never worked. Iʼll fix those separately.

Robert


This bug report was last modified 5 years and 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.