repair-afs-cryptall-20010111
[openafs.git] / src / afs / afs_conn.c
index dfae26a..0e984f0 100644 (file)
@@ -1,11 +1,13 @@
-/* Copyright (C) 1995, 1989, 1998 Transarc Corporation - All rights reserved */
 /*
- * (C) COPYRIGHT IBM CORPORATION 1987, 1988
- * LICENSED MATERIALS - PROPERTY OF IBM
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ * 
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
  */
+
 /*
- * afs_conn.c
- *
  * Implements:
  */
 #include "../afs/param.h"      /* Should be always first */
@@ -30,6 +32,9 @@
 #if    defined(AFS_SUN56_ENV)
 #include <inet/led.h>
 #include <inet/common.h>
+#if     defined(AFS_SUN58_ENV)
+#include <netinet/ip6.h>
+#endif
 #include <inet/ip.h>
 #endif
 
@@ -215,15 +220,15 @@ struct conn *afs_ConnBySA(struct srvAddr *sap, unsigned short aport,
 
              if (cryptall) {
                level=rxkad_crypt;
-               isec=3;
-             }
-             else {
+             } else {
                level=rxkad_clear;
-               isec=2;
              }
-               /* kerberos tickets on channel 2 */
-               csec = rxkad_NewClientSecurityObject(level, tu->ct.HandShakeKey,
-                       /* kvno */ tu->ct.AuthHandle, tu->stLen, tu->stp);
+             isec=2;
+             /* kerberos tickets on channel 2 */
+             csec = rxkad_NewClientSecurityObject(level, tu->ct.HandShakeKey,
+                                                  /* kvno */ 
+                                                  tu->ct.AuthHandle, 
+                                                  tu->stLen, tu->stp);
        }
        if (isec == 0)
            csec = rxnull_NewClientSecurityObject();