]> arthur.barton.de Git - netatalk.git/commitdiff
test for the whole loopback subbnet not only 127.0.0.1
authordidg <didg>
Sat, 17 Mar 2007 14:44:36 +0000 (14:44 +0000)
committerdidg <didg>
Sat, 17 Mar 2007 14:44:36 +0000 (14:44 +0000)
libatalk/dsi/dsi_tcp.c

index 0d58394868eec759946530f477cb20e52dc29f22..19e6b6200d3523b10f1963ef35e8bcef2c5c3d11 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: dsi_tcp.c,v 1.9.10.7.2.2 2007-02-17 03:13:29 didg Exp $
+ * $Id: dsi_tcp.c,v 1.9.10.7.2.3 2007-03-17 14:44:36 didg Exp $
  *
  * Copyright (c) 1997, 1998 Adrian Sun (asun@zoology.washington.edu)
  * All rights reserved. See COPYRIGHT.
@@ -297,7 +297,7 @@ int dsi_tcp_init(DSI *dsi, const char *hostname, const char *address,
       }
   }
   else {
-      if (((struct in_addr *) host->h_addr)->s_addr !=  htonl(0x7F000001)) { /* FIXME ugly check */
+      if (( ((struct in_addr *) host->h_addr)->s_addr & htonl(0x7F000000) ) !=  htonl(0x7F000000)) { /* FIXME ugly check */
           dsi->server.sin_addr.s_addr = ((struct in_addr *) host->h_addr)->s_addr;
           return 1;
       }