Date: Wed, 31 Oct 2007 11:10:02 GMT From: Remko Lodder <remko@FreeBSD.org> To: freebsd-net@FreeBSD.org Subject: Re: misc/117711: rpcbind binds to all interfaces on random ports even when using the -h flag Message-ID: <200710311110.l9VBA22x029011@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/117711; it has been noted by GNATS. From: Remko Lodder <remko@FreeBSD.org> To: Carlos Eduardo Monti <slaytanic@gmail.com> Cc: freebsd-gnats-submit@FreeBSD.org, Matteo Riondato <matteo@freebsd.org> 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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710311110.l9VBA22x029011>