X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Froute.c;h=94c3d576715b6089407f33b3513c24eabc28d657;hp=00b5298b3dacedd3c8a91d425318042418f1d7ff;hb=2be8e69ca16e1558463c39c48af76d3d4a4674b7;hpb=e0dee537705cdbd005f6ab1fbef5ac71dc8411c0 diff --git a/src/route.c b/src/route.c index 00b5298b..94c3d576 100644 --- a/src/route.c +++ b/src/route.c @@ -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.35 2002/03/15 15:40:40 guus Exp $ + $Id: route.c,v 1.1.2.38 2002/04/19 14:06:40 guus Exp $ */ #include "config.h" @@ -40,6 +40,7 @@ #include #include #include +#include #include @@ -52,10 +53,6 @@ #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 +265,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; @@ -399,7 +396,7 @@ cp n = route_ipv4(packet); break; case 0x86DD: - if(packet->data[20] == IPPROTO_ICMPV6 && packet->data[54] = ND_NEIGHBOR_SOLICIT) + if(packet->data[20] == IPPROTO_ICMPV6 && packet->data[54] == ND_NEIGHBOR_SOLICIT) { route_neighborsol(packet); return;