GNU bug report logs - #34134
27.0.50; process-contact for accepted sockets broken

Previous Next

Package: emacs;

Reported by: Mathew Handugan <mathew <at> handugan.com>

Date: Sat, 19 Jan 2019 10:36:02 UTC

Severity: normal

Found in version 27.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

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: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#34134: closed (27.0.50; process-contact for accepted sockets
 broken)
Date: Wed, 30 Jan 2019 23:14:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 30 Jan 2019 15:13:51 -0800
with message-id <6edec1e6-bbbb-f55a-6b95-a5c068d91a35 <at> cs.ucla.edu>
and subject line Re: bug#34134: 27.0.50; process-contact for accepted sockets broken
has caused the debbugs.gnu.org bug report #34134,
regarding 27.0.50; process-contact for accepted sockets broken
to be marked as done.

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


-- 
34134: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34134
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Mathew Handugan <mathew <at> handugan.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; process-contact for accepted sockets broken
Date: Fri, 18 Jan 2019 22:52:41 -0800
[Message part 3 (text/plain, inline)]
Git commit be9e60fc3c43cc49cc5d749924c3e96737ae297c  causes accepted
sockets to store 't as :host instead of the string-formatted peer IP
address.

This manifests as
 (process-contact proc)
returning something like
 (t 55269)

instead of the expected:
 ("192.168.2.13" 55269)

my clumsy attempt at a simple example:

(defun echo-server-filter (proc string) (print (format "%s %s"
(process-contact proc) string)))
(progn
  (setq echo-server-port 10000)
  (make-network-process :name "echo-server" :family 'ipv4 :service
echo-server-port :filter 'echo-server-filter :sentinel 'echo-server-filter
:server 't)
  (let ((client-process (open-network-stream "echo-client"
                             "*echo-client*" "localhost" echo-server-port)))
    (process-send-string client-process "hello world\n")
    (sleep-for 1)
    (delete-process client-process))
  (delete-process "echo-server")
  )
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>, Mathew Handugan <mathew <at> handugan.com>
Cc: 34134-done <at> debbugs.gnu.org
Subject: Re: bug#34134: 27.0.50; process-contact for accepted sockets broken
Date: Wed, 30 Jan 2019 15:13:51 -0800
[Message part 6 (text/plain, inline)]
On 1/25/19 12:07 AM, Eli Zaretskii wrote:
>> From: Mathew Handugan <mathew <at> handugan.com>
>> Date: Fri, 18 Jan 2019 22:52:41 -0800
>>
>> Git commit be9e60fc3c43cc49cc5d749924c3e96737ae297c  causes accepted sockets to store 't as :host
>> instead of the string-formatted peer IP address.
>>
>> This manifests as
>>   (process-contact proc)
>> returning something like
>>   (t 55269)
>>
>> instead of the expected:
>>   ("192.168.2.13" 55269)
> Thanks.  Paul, could you please take a look at this?

Thanks for reporting the bug, especially the test case. I reproduce the 
problem and fixed it by installing the attached patch into the emacs-26 
branch on Savannah.

[0001-Fix-process-contact-bug-with-TCP-connections.patch (text/x-patch, attachment)]

This bug report was last modified 6 years and 191 days ago.

Previous Next


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