From: Neil Brown Date: Tue, 13 Mar 2007 03:39:49 +0000 (+1100) Subject: Restore use of un-connected socket for UDP mount requests. X-Git-Tag: nfs-utils-1-1-0-rc1~87 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=7f9343a38c031d9cc61a6bc7e06df519b16d1293;hp=7f9343a38c031d9cc61a6bc7e06df519b16d1293;p=nfs-utils.git Restore use of un-connected socket for UDP mount requests. When connecting to an NFSv4 server we need to find out IP address as it would be seen by the server, to register an address for callbacks. This is most easily done by connecting the socket to the servers address and then getting the address of our endpoint. However with a connected UDP socket, replies that come from a different IP address - as can happen with non-Linux multi-homed servers - will be rejected. So if we connected our UDP socket, we need to be sure to disconnect it before using it. This patch adds an option to get_socket to say if we want it connected or not and, in the case where we do, we disconnect a UDP socket after the connection information has been used. Also clean up the error handling in clnt_ping which was getting clumsy. ---