Print this page
inet_pton

@@ -20,10 +20,13 @@
  */
 /*
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ */
 
 #include <sys/systm.h>
 #include <rpc/auth.h>
 #include <rpc/clnt.h>
 #include <nfs/nfs4_kprot.h>

@@ -115,27 +118,11 @@
                                                 return (EINVAL);
                                         }
                                 }
                                 port += c;
 
-
-                                /* reset to network order */
-                                if (af == AF_INET) {
-                                        *(uint32_t *)ap =
-                                            htonl(*(uint32_t *)ap);
                                         *pp = htons(port);
-                                } else {
-                                        int ix;
-                                        uint16_t *sap;
-
-                                        for (sap = ap, ix = 0; ix <
-                                            sizeof (struct in6_addr) /
-                                            sizeof (uint16_t); ix++)
-                                                sap[ix] = htons(sap[ix]);
-
-                                        *pp = htons(port);
-                                }
 
                                 ua[k] = '.';
                                 return (0);
                         } else {
                                 ua[k] = '.';