From owner-freebsd-net@FreeBSD.ORG Wed Oct 31 11:10:02 2007 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD75E16A478 for ; Wed, 31 Oct 2007 11:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id AC10313C4BB for ; Wed, 31 Oct 2007 11:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9VBA2qk029012 for ; Wed, 31 Oct 2007 11:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9VBA22x029011; Wed, 31 Oct 2007 11:10:02 GMT (envelope-from gnats) Date: Wed, 31 Oct 2007 11:10:02 GMT Message-Id: <200710311110.l9VBA22x029011@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Remko Lodder Cc: Subject: Re: misc/117711: rpcbind binds to all interfaces on random ports even when using the -h flag X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Remko Lodder List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2007 11:10:02 -0000 The following reply was made to PR kern/117711; it has been noted by GNATS. From: Remko Lodder To: Carlos Eduardo Monti Cc: freebsd-gnats-submit@FreeBSD.org, Matteo Riondato Subject: Re: misc/117711: rpcbind binds to all interfaces on random ports even when using the -h flag Date: Wed, 31 Oct 2007 10:55:13 +0100 Carlos Eduardo Monti wrote: >> Description: > rpcbind opens two sockets on all interfaces on random ports when specified the -h flag, one socket for udp4 and one for udp6. > >> How-To-Repeat: > overnight# sockstat | grep rpcbind > overnight# rpcbind -h 192.168.0.3 > overnight# sockstat | grep rpcbind > root rpcbind 2696 4 udp6 *:* *:* > root rpcbind 2696 5 stream /var/run/rpcbind.sock > root rpcbind 2696 6 udp6 ::1:111 *:* > root rpcbind 2696 7 udp6 *:* *:* > root rpcbind 2696 8 udp6 *:617 *:* > root rpcbind 2696 9 tcp6 ::1:111 *:* > root rpcbind 2696 10 tcp6 *:* *:* > root rpcbind 2696 11 udp4 127.0.0.1:111 *:* > root rpcbind 2696 12 udp4 192.168.0.3:111 *:* > root rpcbind 2696 13 udp4 *:944 *:* > root rpcbind 2696 14 tcp4 127.0.0.1:111 *:* > root rpcbind 2696 15 tcp4 192.168.0.3:111 *:* > overnight# killall rpcbind > overnight# rpcbind -h 192.168.0.3 > overnight# sockstat | grep rpcbind > root rpcbind 2701 4 udp6 *:* *:* > root rpcbind 2701 5 stream /var/run/rpcbind.sock > root rpcbind 2701 6 udp6 ::1:111 *:* > root rpcbind 2701 7 udp6 *:* *:* > root rpcbind 2701 8 udp6 *:943 *:* > root rpcbind 2701 9 tcp6 ::1:111 *:* > root rpcbind 2701 10 tcp6 *:* *:* > root rpcbind 2701 11 udp4 127.0.0.1:111 *:* > root rpcbind 2701 12 udp4 192.168.0.3:111 *:* > root rpcbind 2701 13 udp4 *:804 *:* > root rpcbind 2701 14 tcp4 127.0.0.1:111 *:* > root rpcbind 2701 15 tcp4 192.168.0.3:111 *:* > Isn't this just behaviour of RPCbind which selects some random sockets by default? the -h is used to bind it to a specific IP address, not to bind it to specific ports (as far as i can recall), so what you are printing is really what I would expect it to be. Matteo, you worked on this recently, can you shed a light on this? and if my reasoning above is correct, can you please close the ticket since it's desired behaviour? Thanks remko -- Kind regards, Remko Lodder ** remko@elvandar.org FreeBSD ** remko@FreeBSD.org /* Quis custodiet ipsos custodes */