X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Froute.c;h=e1866a989880fa66462d0557d33fd5b2faeb0f7f;hp=097dd13fc1508e2b54f17612d6735f9a367ecf13;hb=07e37f8da03fa315be39623e62d8acba617aa226;hpb=e1de9ca990ea638c7e297c5335be415e44c250c1 diff --git a/src/route.c b/src/route.c index 097dd13f..e1866a98 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.33 2002/03/15 14:41:57 guus Exp $ + $Id: route.c,v 1.1.2.36 2002/03/15 15:50:14 guus Exp $ */ #include "config.h" @@ -52,6 +52,10 @@ #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; @@ -275,7 +279,7 @@ cp if(subnet->owner == myself) return; /* silently ignore */ - + /* Create neighbor advertation reply */ memcpy(packet->data, packet->data + ETHER_ADDR_LEN, ETHER_ADDR_LEN); /* copy destination address */ @@ -305,6 +309,8 @@ cp checksum = inet_checksum((unsigned short int *)&pseudo, sizeof(pseudo)/2, ~0); checksum = inet_checksum((unsigned short int *)ns, sizeof(*ns)/2 + 4, checksum); + ns->nd_ns_hdr.icmp6_cksum = htons(checksum); + write_packet(packet); cp } @@ -393,12 +399,12 @@ cp n = route_ipv4(packet); break; case 0x86DD: - n = route_ipv6(packet); - if(!n && packet->data[0] == 0x33 && packet->data[1] == 0x33 && packet->data[2] == 0xff) + if(packet->data[20] == IPPROTO_ICMPV6 && packet->data[54] == ND_NEIGHBOR_SOLICIT) { route_neighborsol(packet); return; } + n = route_ipv6(packet); break; case 0x0806: route_arp(packet);