]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/network.c
mount: Set protocol family properly for "udp" and "tcp"
[nfs-utils.git] / utils / mount / network.c
index f020933dfe87d6ed1d55e6e04b401943d5d768a2..8dc183a16e78983ef8fcf8f79506275b1c635763 100644 (file)
@@ -1373,8 +1373,9 @@ int nfs_nfs_proto_family(struct mount_options *options,
 
        switch (po_rightmost(options, nfs_transport_opttbl)) {
        case 0: /* udp */
 
        switch (po_rightmost(options, nfs_transport_opttbl)) {
        case 0: /* udp */
-               return 1;
        case 1: /* tcp */
        case 1: /* tcp */
+               /* for compatibility; these are always AF_INET */
+               *family = AF_INET;
                return 1;
        case 2: /* proto */
                option = po_get(options, "proto");
                return 1;
        case 2: /* proto */
                option = po_get(options, "proto");