From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#34617: 27.0.50; Can't bind a server process to all interfaces? Date: Fri, 22 Feb 2019 14:43:48 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="198581"; mail-complaints-to="usenet@blaine.gmane.org" To: 34617@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 22 14:46:19 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 esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxB9f-000pVi-2C for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Feb 2019 14:46:19 +0100 Original-Received: from localhost ([127.0.0.1]:50900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxB9d-0005rD-Rv for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Feb 2019 08:46:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxB9T-0005qC-5t for bug-gnu-emacs@gnu.org; Fri, 22 Feb 2019 08:46:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gxB9R-00074x-DV for bug-gnu-emacs@gnu.org; Fri, 22 Feb 2019 08:46:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34133) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gxB9O-00070c-QE for bug-gnu-emacs@gnu.org; Fri, 22 Feb 2019 08:46:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gxB9O-0004Pg-JA for bug-gnu-emacs@gnu.org; Fri, 22 Feb 2019 08:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Feb 2019 13:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34617 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155084315116942 (code B ref -1); Fri, 22 Feb 2019 13:46:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Feb 2019 13:45:51 +0000 Original-Received: from localhost ([127.0.0.1]:47677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gxB9C-0004PB-U4 for submit@debbugs.gnu.org; Fri, 22 Feb 2019 08:45:51 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38925) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gxB9A-0004Oy-S4 for submit@debbugs.gnu.org; Fri, 22 Feb 2019 08:45:49 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:54044) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gxB92-0006im-5d for submit@debbugs.gnu.org; Fri, 22 Feb 2019 08:45:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxB90-0005nY-MO for bug-gnu-emacs@gnu.org; Fri, 22 Feb 2019 08:45:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gxB7U-0004eu-Lg for bug-gnu-emacs@gnu.org; Fri, 22 Feb 2019 08:44:05 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]:43006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gxB7U-0004LP-9I for bug-gnu-emacs@gnu.org; Fri, 22 Feb 2019 08:44:04 -0500 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gxB7E-0007Wn-K7 for bug-gnu-emacs@gnu.org; Fri, 22 Feb 2019 14:43:50 +0100 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:155638 Archived-At: I'm looking to bind a server process to all interfaces on the machine. If I say: (make-network-process :name name :family 'ipv4 :service port :host (system-name) :server t)) then the process won't be listening to the localhost address, and if I say :host nil, it'll only be listening to the localhost address. Am I missing something, or does Emacs just not have a way to listen to INADDR_ANY? The code in make-network-process seems to imply that (and could probably do with a slight rewrite): /* :host HOST -- hostname, ip address, or 'local for localhost. */ host = Fplist_get (contact, QChost); if (NILP (host)) { /* The "connection" function gets it bind info from the address we're given, so use this dummy address if nothing is specified. */ #ifdef HAVE_LOCAL_SOCKETS if (family != AF_LOCAL) #endif { if (family == AF_INET6) host = build_string ("::1"); else host = build_string ("127.0.0.1"); } } else { if (EQ (host, Qlocal)) { /* Depending on setup, "localhost" may map to different IPv4 and/or IPv6 addresses, so it's better to be explicit (Bug#6781). */ if (family == AF_INET6) host = build_string ("::1"); else host = build_string ("127.0.0.1"); } CHECK_STRING (host); } In GNU Emacs 27.0.50 (build 62, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2019-02-11 built on stories Repository revision: 2860f6cec56b02120b0b62cb3733c00a9e5359db Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.11902000 System Description: Debian GNU/Linux 9 (stretch) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no