From owner-freebsd-current@freebsd.org Sun Jun 21 21:37:25 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36631335410 for ; Sun, 21 Jun 2020 21:37:25 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49qm905vJGz3Rdw; Sun, 21 Jun 2020 21:37:24 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from mb.fritz.box (ip4d15f5fc.dynamic.kabel-deutschland.de [77.21.245.252]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 73EBB7220B803; Sun, 21 Jun 2020 23:37:20 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: ? ????? ??: vnc can't connect to socket From: Michael Tuexen In-Reply-To: <202006212112.05LLCKQR006977@gndrsh.dnsmgr.net> Date: Sun, 21 Jun 2020 23:37:19 +0200 Cc: Ian Lepore , "bergerkos@yahoo.co.uk" , "freebsd-current@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <0DEC72D2-00D3-42E2-8FCA-ED1D6D65CDB7@freebsd.org> References: <202006212112.05LLCKQR006977@gndrsh.dnsmgr.net> To: "Rodney W. Grimes" X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 49qm905vJGz3Rdw X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:680, ipnet:2001:638::/32, country:DE] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2020 21:37:25 -0000 > On 21. Jun 2020, at 23:12, Rodney W. Grimes = wrote: >=20 >>> On Sun, 2020-06-21 at 14:54 +0200, Michael Tuexen wrote: >>>>> On 21. Jun 2020, at 14:28, Kostya Berger >>>>> wrote: >>>>>=20 >>>>> Ok, it turns out, it gives the previously mentioned error only if = I >>>>> use VNC server string 0.0.0.0:5900 (as I always did). in my VNC >>>>> client.But when replaced with127.0.0.1:5900it connects all right. >>>>=20 >>>> I don't hink 0.0.0.0 is a valid destination address you can use in >>>> connect(). Using 127.0.0.1 should >>>> be fine. >>=20 >> I do not believe that this is a destination address when your talking >> about 0.0.0.0:5900 on the VNC server side, that is a wild card accept >> any address and if this has been broken.. it must be fixed! >>=20 >>>> I guess, https://svnweb.freebsd.org/changeset/base/361752 is the >>>> relevant commit here. >>>>=20 >>>=20 >>> *BSD has always accepted 0 as a synonym for localhost (and iirc, = linux >>> does not). If this no longer works, it's a regression which is = going >>> to cause existing applications and scripts to fail. At the very = least >>> it deserves an entry in UPDATING. >>=20 >> I am not aware of that, but can not deny it either, and just = confirmed >> it to be true: >> root {1002}# telnet 0.0.0.0 22 >> Trying 0.0.0.0... >> Connected to 0.0.0.0. >> Escape character is '^]'. >> SSH-2.0-OpenSSH_7.8 FreeBSD-20180909 >=20 > And to add the netstat data to show what connected: > tcp4 0 0 127.0.0.1.22 127.0.0.1.43135 = ESTABLISHED > tcp4 38 0 127.0.0.1.43135 127.0.0.1.22 = ESTABLISHED >=20 > Can we back this commit out, discuss it in next weeks call, > and then find a way forward? The commit changes the behaviour of calling connect(..., addr, ...) on a = TCP/IPv4 socket by (a) failing it and indicating EAFNOSUPPORT if addr =3D=3D = 255.255.255.255 (b) failing it and indicating EAFNOSUPPORT if addr =3D=3D 0.0.0.0 I think it is correct in doing (a). There is no doubt about that, since = TCP only supports unicast. (b) can be changed. As we discussed, for IPv6 connecting to ::0 is = changed to ::1 in = https://svnweb.freebsd.org/base/head/sys/netinet6/in6_pcb.c?view=3Dmarkup#= l370. However, in_pcbladdr() does not do that mapping.=20 Let me figure out why 0.0.0.0 works as an address you can connect to. = Then I can prepare a patch to allow 0.0.0.0 again. I don't see a reason why we need = to revert r361752 and introduce it partially again. OK? Best regards Michael >=20 >>=20 >> INADDR_ANY is the wildcard listen address, but as a destination what = code remapped >> it to 127.0.0.1? >>=20 >> We should very seriously consider restoring this behavior. >>=20 >>> -- Ian >>>=20 >>>> Best regards >>>> Michael >>>>> ?????????? ?? Yahoo ????? ??? Android=20 >>>>>=20 >>>>> ??, 21 ???. 2020 ? 9:40 Kostya Berger >>>>> ???????(-?): Hi,upgraded to 362292 via buildworld.Now I cannot >>>>> connect to my bhyve guest as I used to: neither via VNC nor via >>>>> RDP.VNC gets error: unable to connect the socket. Address family >>>>> not supported by protocol family (47). >>>>> Neither can I ping my bhyve IP (it uses a separate NIC and should >>>>> have no problems) >>>>> Internet connectivity is ok and I can ping other hosts on my >>>>> network. >>>>> In 359997 all works fine. >>>>> ?????????? ?? Yahoo ????? ??? Android =20 >>>>> _______________________________________________ >>>>> freebsd-current@freebsd.org mailing list >>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-current >>>>> To unsubscribe, send any mail to " >>>>> freebsd-current-unsubscribe@freebsd.org" >>>>=20 >>>> _______________________________________________ >>>> freebsd-current@freebsd.org mailing list >>>> https://lists.freebsd.org/mailman/listinfo/freebsd-current >>>> To unsubscribe, send any mail to " >>>> freebsd-current-unsubscribe@freebsd.org" >>>>=20 >>>=20 >>> _______________________________________________ >>> freebsd-current@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-current >>> To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org" >>>=20 >>>=20 >>=20 >> --=20 >> Rod Grimes = rgrimes@freebsd.org >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org" >>=20 >=20 > --=20 > Rod Grimes = rgrimes@freebsd.org