From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mathew Handugan Newsgroups: gmane.emacs.bugs Subject: bug#34134: 27.0.50; process-contact for accepted sockets broken Date: Fri, 18 Jan 2019 22:52:41 -0800 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008417ed057fca13be" X-Trace: blaine.gmane.org 1547894050 19011 195.159.176.226 (19 Jan 2019 10:34:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2019 10:34:10 +0000 (UTC) To: 34134@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 19 11:34:05 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gknwx-0004m6-Gw for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jan 2019 11:34:03 +0100 Original-Received: from localhost ([127.0.0.1]:54056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gknz4-0003U0-LA for geb-bug-gnu-emacs@m.gmane.org; Sat, 19 Jan 2019 05:36:14 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33985) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gknyu-0003Rt-Ek for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 05:36:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gknyt-0000dR-Kf for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 05:36:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38040) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gknyt-0000cY-9r for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 05:36:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gknys-0005P0-Ng for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 05:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mathew Handugan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Jan 2019 10:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34134 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.154789411820692 (code B ref -1); Sat, 19 Jan 2019 10:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Jan 2019 10:35:18 +0000 Original-Received: from localhost ([127.0.0.1]:37321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkny9-0005Nf-B7 for submit@debbugs.gnu.org; Sat, 19 Jan 2019 05:35:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gkkV3-0008Ie-8D for submit@debbugs.gnu.org; Sat, 19 Jan 2019 01:53:01 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:33849) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gkkUx-00029u-R0 for submit@debbugs.gnu.org; Sat, 19 Jan 2019 01:52:55 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkkUw-00074v-VA for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 01:52:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gkkUw-00026U-5x for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 01:52:54 -0500 Original-Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:32992) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gkkUv-00024e-MC for bug-gnu-emacs@gnu.org; Sat, 19 Jan 2019 01:52:54 -0500 Original-Received: by mail-qt1-x833.google.com with SMTP id l11so17859631qtp.0 for ; Fri, 18 Jan 2019 22:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=handugan.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=AymvcgT2LoYM7otdAGXEtZKVpojvc1Wo4xArcMhOOp8=; b=OLeBfT9ltM2uuK0mXxCvW+wOijmoVSo2cdIICdiy6LeYy1UNC2e0J19oTfHxeGIgq8 qLo0SduvrZx4ZaO644XOFLCta7Npzl4HedKQocpuOlFhFieA+aePNqmvF3iL6OwPPXdV /iHC9VIgv8JSYvnqYEABFo/YQih4PdRoL7EJf68zdePPYTQvmUUeJezXJDasTKXz+C8r k0bmIz/tnoeaKJNQSuzMMrdS0LwTSNdqaXYzC/8NodDeWwDDtBgAzPG6ztaO4YWSBJJJ fU0GYhrvbJSyGP0Rk8Vh9RXch1o2qRBYA1g/5gsNG7Ph00EewTdD2+hLVWy1aKMEP4iI m/Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=AymvcgT2LoYM7otdAGXEtZKVpojvc1Wo4xArcMhOOp8=; b=NXT8Z1MulyLny+vO9Cw/iURGdj3Mi1QRvep/qBXoEtsspHuwcl7svAGyytvYre9YIV Wd25TUr5HsIhZApiTUZcArawds5t9axK7vfLw7HJ07BJdMtRjALyjb356rYkJekrdqb8 +rZZHUZ9iVfrJuUEGnsLLrPdUeMNLE24Uzi+J7tL+Z40bPaSKC7gn6boKYq+UIfDiZEo Osc3eTQuuVp1IZQ+9m63C8WZWvBPl7Xq4qIC4x7NuImfeikXNO0Q13aetNzSXbW1zNPF 3wwOO8StNKlTsoeiJaUeRit+W4npz4rQ+pAGMl+yWUoJuud2D9nQBf3USA7fo412MPay up4g== X-Gm-Message-State: AJcUukc1IREKille/1JYf6lretq0c4n+t3HitRg74rkuqBn65DKZDp7j uD04qB2xFhSqxfrUe3TWC86GZnUdd4M20079PP/IMuZpjTaBzg== X-Google-Smtp-Source: ALg8bN5L3PHHhaeqfo5KxHxvoZ/4iIT/QgbWOk+kE8UnpsFXCzZUlrqW8M5gVKKdy6TLNk7Q2RtsyEGxN0ApPDNuL/U= X-Received: by 2002:ac8:1712:: with SMTP id w18mr18798651qtj.76.1547880771091; Fri, 18 Jan 2019 22:52:51 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Sat, 19 Jan 2019 05:35:14 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154585 Archived-At: --0000000000008417ed057fca13be Content-Type: text/plain; charset="UTF-8" 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") ) --0000000000008417ed057fca13be Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Git commit be9e60fc3c43cc49cc5d749924c3e96737ae297c =C2=A0= causes accepted sockets to store 't as :host instead of the string-form= atted peer IP address.

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

instead of the = expected:
=C2=A0("192.168.2.13" 55269)

my clumsy attemp= t at a simple example:

(defun echo-server-filter (proc string) (prin= t (format "%s %s" (process-contact proc) string)))
(progn
= =C2=A0 (setq echo-server-port 10000)
=C2=A0 (make-network-process :name = "echo-server" :family 'ipv4 :service echo-server-port :filter= 'echo-server-filter :sentinel 'echo-server-filter :server 't)<= br>=C2=A0 (let ((client-process (open-network-stream "echo-client"= ;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"*echo-client*" "localhost= " echo-server-port)))
=C2=A0 =C2=A0 (process-send-string client-pro= cess "hello world\n")
=C2=A0 =C2=A0 (sleep-for 1)
=C2=A0 = =C2=A0 (delete-process client-process))
=C2=A0 (delete-process "ech= o-server")
=C2=A0 )


--0000000000008417ed057fca13be--