]> git.meshlink.io Git - meshlink/commitdiff
Don't use s6_addr[16|32] anymore.
authorGuus Sliepen <guus@tinc-vpn.org>
Tue, 19 Mar 2002 00:08:23 +0000 (00:08 +0000)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 19 Mar 2002 00:08:23 +0000 (00:08 +0000)
src/netutl.c
src/route.c

index 3b5d5b05d7eb8ed2cc11109da1bd995ade9d656b..c59a34b8161abf0ad771e482ebd83700e0b7d5c2 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id: netutl.c,v 1.12.4.32 2002/03/18 14:39:37 guus Exp $
+    $Id: netutl.c,v 1.12.4.33 2002/03/19 00:08:23 guus Exp $
 */
 
 #include "config.h"
 
 #include "system.h"
 
-#ifndef s6_addr32
-#define s6_addr32 __u6_addr.__u6_addr32
-#endif
-
 int hostnames = 0;
 
 /*
@@ -179,7 +175,7 @@ void sockaddrunmap(sockaddr_t *sa)
 {
   if(sa->sa.sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&sa->in6.sin6_addr))
     {
-      sa->in.sin_addr.s_addr = sa->in6.sin6_addr.s6_addr32[3];
+      sa->in.sin_addr.s_addr = ((uint32_t *)&sa->in6.sin6_addr)[3];
       sa->in.sin_family = AF_INET;
     }
 }
index e1866a989880fa66462d0557d33fd5b2faeb0f7f..dcf43e41e712c5a845a3f6727fda456ca0ec60d9 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id: route.c,v 1.1.2.36 2002/03/15 15:50:14 guus Exp $
+    $Id: route.c,v 1.1.2.37 2002/03/19 00:08:23 guus Exp $
 */
 
 #include "config.h"
 
 #include "system.h"
 
-#ifndef s6_addr16
-#define s6_addr16 __u6_addr.__u6_addr16
-#endif
-
 int routing_mode = RMODE_ROUTER;
 int priorityinheritance = 0;
 int macexpire = 600;
@@ -268,8 +264,8 @@ cp
       if(debug_lvl >= DEBUG_TRAFFIC)
         {
           syslog(LOG_WARNING, _("Cannot route packet: neighbor solicitation request for unknown address %hx:%hx:%hx:%hx:%hx:%hx:%hx:%hx"),
-                 ntohs(ns->nd_ns_target.s6_addr16[0]), ntohs(ns->nd_ns_target.s6_addr16[1]), ntohs(ns->nd_ns_target.s6_addr16[2]), ntohs(ns->nd_ns_target.s6_addr16[3]),
-                 ntohs(ns->nd_ns_target.s6_addr16[4]), ntohs(ns->nd_ns_target.s6_addr16[5]), ntohs(ns->nd_ns_target.s6_addr16[6]), ntohs(ns->nd_ns_target.s6_addr16[7]));
+                 ntohs(((uint16_t *)&ns->nd_ns_target)[0]), ntohs(((uint16_t *)&ns->nd_ns_target)[1]), ntohs(((uint16_t *)&ns->nd_ns_target)[2]), ntohs(((uint16_t *)&ns->nd_ns_target)[3]),
+                 ntohs(((uint16_t *)&ns->nd_ns_target)[4]), ntohs(((uint16_t *)&ns->nd_ns_target)[5]), ntohs(((uint16_t *)&ns->nd_ns_target)[6]), ntohs(((uint16_t *)&ns->nd_ns_target)[7]));
         }
 
       return;