--- volume.c	2009-11-30 20:53:56.000000000 +0100
+++ volume.c-didier	2009-11-30 20:43:15.000000000 +0100
@@ -1303,10 +1285,6 @@
         switch ( bit ) {
         case VOLPBIT_ATTR :
             ashort = 0;
-            if (0 == (vol->v_flags & AFPVOL_NOFILEID) && vol->v_cdb != NULL &&
-                           (vol->v_cdb->flags & CNID_FLAG_PERSISTENT)) {
-                ashort = VOLPBIT_ATTR_FILEID;
-            }
             /* check for read-only.
              * NOTE: we don't actually set the read-only flag unless
              *       it's passed in that way as it's possible to mount
@@ -1315,11 +1293,20 @@
                     ((utime(vol->v_path, NULL) < 0) && (errno == EROFS))) {
                 ashort |= VOLPBIT_ATTR_RO;
             }
-            ashort |= VOLPBIT_ATTR_CATSEARCH;
-            if (afp_version >= 30) {
-                ashort |= VOLPBIT_ATTR_UTF8;
-	        if (vol->v_flags & AFPVOL_UNIX_PRIV)
-		    ashort |= VOLPBIT_ATTR_UNIXPRIV;
+            /* prior 2.1 only VOLPBIT_ATTR_RO is defined */
+            if (afp_version > 20) {
+
+                if (0 == (vol->v_flags & AFPVOL_NOFILEID) && vol->v_cdb != NULL &&
+                           (vol->v_cdb->flags & CNID_FLAG_PERSISTENT)) {
+                    ashort |= VOLPBIT_ATTR_FILEID;
+                }
+
+                ashort |= VOLPBIT_ATTR_CATSEARCH;
+                if (afp_version >= 30) {
+                    ashort |= VOLPBIT_ATTR_UTF8;
+                    if (vol->v_flags & AFPVOL_UNIX_PRIV)
+                        ashort |= VOLPBIT_ATTR_UNIXPRIV;
+                }
             }
             ashort = htons(ashort);
             memcpy(data, &ashort, sizeof( ashort ));
