2 * The olsr.org Optimized Link-State Routing daemon(olsrd)
3 * Copyright (c) 2004-2009, the olsr.org team - see HISTORY file
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
16 * * Neither the name of olsr.org, olsrd nor the names of its
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
30 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
33 * Visit http://www.olsr.org for more information.
35 * If you find this software useful feel free to make a donation
36 * to the project. For more information see the website or contact
37 * the copyright holders.
45 #include <stddef.h> /* NULL */
46 #include <sys/types.h> /* ssize_t */
47 #include <string.h> /* strerror() */
48 #include <stdarg.h> /* va_list, va_start, va_end */
49 #include <errno.h> /* errno */
50 #include <assert.h> /* assert() */
51 #include <linux/if_ether.h> /* ETH_P_IP */
52 #include <linux/if_packet.h> /* struct sockaddr_ll, PACKET_MULTICAST */
53 #include <signal.h> /* sigset_t, sigfillset(), sigdelset(), SIGINT */
54 #include <netinet/ip.h> /* struct ip */
55 #include <netinet/udp.h> /* struct udphdr */
56 #include <unistd.h> /* close() */
58 #include <netinet/in.h>
59 #include <netinet/ip6.h>
62 #include "plugin_util.h" /* set_plugin_int */
63 #include "defs.h" /* olsr_cnf, //OLSR_PRINTF */
65 #include "olsr.h" /* //OLSR_PRINTF */
66 #include "mid_set.h" /* mid_lookup_main_addr() */
67 #include "link_set.h" /* get_best_link_to_neighbor() */
68 #include "net_olsr.h" /* ipequal */
71 #include "NetworkInterfaces.h" /* TBmfInterface, CreateBmfNetworkInterfaces(), CloseBmfNetworkInterfaces() */
72 #include "Address.h" /* IsMulticast() */
73 #include "Packet.h" /* ENCAP_HDR_LEN, BMF_ENCAP_TYPE, BMF_ENCAP_LEN etc. */
74 #include "list_backport.h"
75 #include "RouterElection.h"
76 #include "list_backport.h"
78 #define OLSR_FOR_ALL_FILTEREDNODES_ENTRIES(n, iterator) listbackport_for_each_element_safe(&ListOfFilteredHosts, n, list, iterator)
80 #define IPH_HL(hdr) (((hdr)->ip_hl)*4)
82 struct list_entity ListOfFilteredHosts;
85 static uint16_t ip_checksum(char* data, int len)
93 sum += *((unsigned short int*)(void *)data);
94 data += sizeof(unsigned short int);
97 sum = (sum >> 16) + (sum & 0xffff);
103 /* -------------------------------------------------------------------------
104 * Function : PacketReceivedFromOLSR
105 * Description: Handle a received packet from a OLSR message
106 * Input : ipPacket into an unsigned char and the lenght of the packet
109 * Data Used : BmfInterfaces
110 * ------------------------------------------------------------------------- */
112 PacketReceivedFromOLSR(unsigned char *encapsulationUdpData, int len)
114 struct ip *ipHeader; /* IP header inside the encapsulated IP packet */
115 struct ip6_hdr *ip6Header; /* IP header inside the encapsulated IP packet */
116 //union olsr_ip_addr mcSrc; /* Original source of the encapsulated multicast packet */
117 //union olsr_ip_addr mcDst; /* Multicast destination of the encapsulated packet */
118 struct TBmfInterface *walker;
119 int stripped_len = 0;
121 ipHeader = (struct ip *)ARM_NOWARN_ALIGN(encapsulationUdpData);
122 ip6Header = (struct ip6_hdr *)ARM_NOWARN_ALIGN(encapsulationUdpData);
124 //mcSrc.v4 = ipHeader->ip_src;
125 //mcDst.v4 = ipHeader->ip_dst;
126 //OLSR_DEBUG(LOG_PLUGINS, "MDNS PLUGIN got packet from OLSR message\n");
129 /* Check with each network interface what needs to be done on it */
130 for (walker = BmfInterfaces; walker != NULL; walker = walker->next) {
131 /* To a non-OLSR interface: unpack the encapsulated IP packet and forward it */
132 if (walker->olsrIntf == NULL) {
134 struct sockaddr_ll dest;
136 memset(&dest, 0, sizeof(dest));
137 dest.sll_family = AF_PACKET;
138 if ((encapsulationUdpData[0] & 0xf0) == 0x40) {
139 dest.sll_protocol = htons(ETH_P_IP);
140 stripped_len = ntohs(ipHeader->ip_len);
142 ipHeader->ip_ttl = (u_int8_t) 1; //setting up TTL to 1 to avoid mdns packets flood
144 //Recalculate IP Checksum
145 ipHeader->ip_sum=0x0000;
146 csum_ip = ip_checksum((char*)ipHeader, IPH_HL(ipHeader));
147 ipHeader->ip_sum=csum_ip;
149 if ((encapsulationUdpData[0] & 0xf0) == 0x60) {
150 dest.sll_protocol = htons(ETH_P_IPV6);
151 stripped_len = 40 + ntohs(ip6Header->ip6_plen); //IPv6 Header size (40) + payload_len
153 ip6Header->ip6_hops = (uint8_t) 1; //setting up Hop Limit to 1 to avoid mdns packets flood
155 // Sven-Ola: Don't know how to handle the "stripped_len is uninitialized" condition, maybe exit(1) is better...?
156 if (0 == stripped_len) return;
157 //TODO: if packet is not IP die here
159 if (stripped_len > len) {
160 //OLSR_DEBUG(LOG_PLUGINS, "MDNS: Stripped len bigger than len ??\n");
162 dest.sll_ifindex = if_nametoindex(walker->ifName);
163 dest.sll_halen = IFHWADDRLEN;
165 /* Use all-ones as destination MAC address. When the IP destination is
166 * a multicast address, the destination MAC address should normally also
167 * be a multicast address. E.g., when the destination IP is 224.0.0.1,
168 * the destination MAC should be 01:00:5e:00:00:01. However, it does not
169 * seem to matter when the destination MAC address is set to all-ones
171 memset(dest.sll_addr, 0xFF, IFHWADDRLEN);
173 if(walker->isActive == 0) { //Don't forward packet if isn't master router
174 OLSR_PRINTF(1,"Not forwarding mDNS packet to interface %s because this router is not master\n",walker->ifName);
177 nBytesWritten = sendto(walker->capturingSkfd, encapsulationUdpData, stripped_len, 0, (struct sockaddr *)&dest, sizeof(dest));
178 if (nBytesWritten != stripped_len) {
179 BmfPError("sendto() error forwarding unpacked encapsulated pkt on \"%s\"", walker->ifName);
184 // "%s: --> unpacked and forwarded on \"%s\"\n",
185 // PLUGIN_NAME_SHORT,
188 } /* if (walker->olsrIntf == NULL) */
190 } /* PacketReceivedFromOLSR */
194 olsr_parser(union olsr_message *m, struct interface_olsr *in_if __attribute__ ((unused)), union olsr_ip_addr *ipaddr)
196 union olsr_ip_addr originator;
198 //OLSR_DEBUG(LOG_PLUGINS, "MDNS PLUGIN: Received msg in parser\n");
199 /* Fetch the originator of the messsage */
200 if (olsr_cnf->ip_version == AF_INET) {
201 memcpy(&originator, &m->v4.originator, olsr_cnf->ipsize);
202 size = ntohs(m->v4.olsr_msgsize);
204 memcpy(&originator, &m->v6.originator, olsr_cnf->ipsize);
205 size = ntohs(m->v6.olsr_msgsize);
208 /* Check if message originated from this node.
209 * If so - back off */
210 if (ipequal(&originator, &olsr_cnf->main_addr))
213 /* Check that the neighbor this message was received from is symmetric.
214 * If not - back off*/
215 if (check_neighbor_link(ipaddr) != SYM_LINK) {
216 //struct ipaddr_str strbuf;
217 //OLSR_PRINTF(3, "NAME PLUGIN: Received msg from NON SYM neighbor %s\n", olsr_ip_to_string(&strbuf, ipaddr));
221 if (olsr_cnf->ip_version == AF_INET) {
222 PacketReceivedFromOLSR((unsigned char *)&m->v4.message, size - 12);
224 PacketReceivedFromOLSR((unsigned char *)&m->v6.message, size - 12 - 96);
226 //forward the message
230 //Sends a packet in the OLSR network
232 olsr_mdns_gen(unsigned char *packet, int len)
234 /* send buffer: huge */
237 union olsr_message *message = (union olsr_message *)buffer;
238 struct interface_olsr *ifn;
242 if ((aligned_size % 4) != 0) {
243 aligned_size = (aligned_size - (aligned_size % 4)) + 4;
247 if (olsr_cnf->ip_version == AF_INET) {
249 message->v4.olsr_msgtype = MESSAGE_TYPE;
250 message->v4.olsr_vtime = reltime_to_me(MDNS_VALID_TIME * MSEC_PER_SEC);
251 memcpy(&message->v4.originator, &olsr_cnf->main_addr, olsr_cnf->ipsize);
252 //message->v4.ttl = MAX_TTL;
253 if (my_MDNS_TTL) message->v4.ttl = my_MDNS_TTL;
254 else message->v4.ttl = MAX_TTL;
255 message->v4.hopcnt = 0;
256 message->v4.seqno = htons(get_msg_seqno());
258 message->v4.olsr_msgsize = htons(aligned_size + 12);
260 memset(&message->v4.message, 0, aligned_size);
261 memcpy(&message->v4.message, packet, len);
262 aligned_size = aligned_size + 12;
265 message->v6.olsr_msgtype = MESSAGE_TYPE;
266 message->v6.olsr_vtime = reltime_to_me(MDNS_VALID_TIME * MSEC_PER_SEC);
267 memcpy(&message->v6.originator, &olsr_cnf->main_addr, olsr_cnf->ipsize);
268 //message->v6.ttl = MAX_TTL;
269 if (my_MDNS_TTL) message->v6.ttl = my_MDNS_TTL;
270 else message->v6.ttl = MAX_TTL;
271 message->v6.hopcnt = 0;
272 message->v6.seqno = htons(get_msg_seqno());
274 message->v6.olsr_msgsize = htons(aligned_size + 12 + 96);
275 memset(&message->v6.message, 0, aligned_size);
276 memcpy(&message->v6.message, packet, len);
277 aligned_size = aligned_size + 12 + 96;
280 /* looping trough interfaces */
281 for (ifn = ifnet; ifn; ifn = ifn->int_next) {
282 //OLSR_PRINTF(1, "MDNS PLUGIN: Generating packet - [%s]\n", ifn->int_name);
284 if (net_outbuffer_push(ifn, message, aligned_size) != aligned_size) {
285 /* send data and try again */
287 if (net_outbuffer_push(ifn, message, aligned_size) != aligned_size) {
288 //OLSR_PRINTF(1, "MDNS PLUGIN: could not send on interface: %s\n", ifn->int_name);
294 /* -------------------------------------------------------------------------
295 * Function : BmfPError
296 * Description: Prints an error message at OLSR debug level 1.
297 * First the plug-in name is printed. Then (if format is not NULL
298 * and *format is not empty) the arguments are printed, followed
299 * by a colon and a blank. Then the message and a new-line.
300 * Input : format, arguments
304 * ------------------------------------------------------------------------- */
307 BmfPError(const char *format, ...)
309 #define MAX_STR_DESC 255
310 char strDesc[MAX_STR_DESC];
312 #if !defined REMOVE_LOG_DEBUG
313 //char *stringErr = strerror(errno);
314 #endif /* !defined REMOVE_LOG_DEBUG */
315 /* Rely on short-circuit boolean evaluation */
316 if (format == NULL || *format == '\0') {
317 //OLSR_DEBUG(LOG_PLUGINS, "%s: %s\n", PLUGIN_NAME, stringErr);
321 va_start(arglist, format);
322 vsnprintf(strDesc, MAX_STR_DESC, format, arglist);
325 strDesc[MAX_STR_DESC - 1] = '\0'; /* Ensures null termination */
327 //OLSR_DEBUG(LOG_PLUGINS, "%s: %s\n", strDesc, stringErr);
331 /* -------------------------------------------------------------------------
332 * Function : MainAddressOf
333 * Description: Lookup the main address of a node
334 * Input : ip - IP address of the node
336 * Return : The main IP address of the node
338 * ------------------------------------------------------------------------- */
340 MainAddressOf(union olsr_ip_addr *ip)
342 union olsr_ip_addr *result;
344 /* TODO: mid_lookup_main_addr() is not thread-safe! */
345 result = mid_lookup_main_addr(ip);
346 if (result == NULL) {
350 } /* MainAddressOf */
353 AddFilteredHost(const char *FilteredHost, void *data __attribute__ ((unused)),
354 set_plugin_parameter_addon addon __attribute__ ((unused))){
357 struct FilteredHost *tmp;
358 tmp = (struct FilteredHost *) malloc(sizeof(struct FilteredHost));
359 listbackport_init_node(&tmp->list);
362 listbackport_init_head(&ListOfFilteredHosts);
366 if(olsr_cnf->ip_version == AF_INET){
367 res = inet_pton(AF_INET, FilteredHost, &tmp->host.v4);
369 listbackport_add_tail(&ListOfFilteredHosts, &tmp->list);
375 res = inet_pton(AF_INET6, FilteredHost, &tmp->host.v6);
377 listbackport_add_tail(&ListOfFilteredHosts, &tmp->list);
386 isInFilteredList(union olsr_ip_addr *src){
388 struct FilteredHost *tmp, *iterator;
389 struct ipaddr_str buf1;
390 struct ipaddr_str buf2;
393 listbackport_init_head(&ListOfFilteredHosts);
398 if(listbackport_is_empty(&ListOfFilteredHosts)) {
399 OLSR_PRINTF(2,"Accept packet captured because of filtered hosts ACL: List Empty\n");
403 OLSR_FOR_ALL_FILTEREDNODES_ENTRIES(tmp, iterator){
404 OLSR_PRINTF(2, "Checking host: %s against list entry: %s\n", olsr_ip_to_string(&buf1, src), olsr_ip_to_string(&buf2, &tmp->host) );
405 if(olsr_cnf->ip_version == AF_INET){
406 if(memcmp(&tmp->host.v4, &src->v4, sizeof(struct in_addr)) == 0)
410 if(memcmp(&tmp->host.v6, &src->v6, sizeof(struct in6_addr)) == 0)
415 OLSR_PRINTF(2,"Accept packet captured because of filtered hosts ACL: Did not find any match in list\n");
419 /* -------------------------------------------------------------------------
420 * Function : BmfPacketCaptured
421 * Description: Handle a captured IP packet
422 * Input : intf - the network interface on which the packet was captured
423 * sllPkttype - the type of packet. Either PACKET_OUTGOING,
424 * PACKET_BROADCAST or PACKET_MULTICAST.
425 * encapsulationUdpData - space for the encapsulation header, followed by
426 * the captured IP packet
429 * Data Used : BmfInterfaces
430 * Notes : The IP packet is assumed to be captured on a socket of family
431 * PF_PACKET and type SOCK_DGRAM (cooked).
432 * ------------------------------------------------------------------------- */
435 //struct TBmfInterface* intf,
436 //unsigned char sllPkttype,
437 unsigned char *encapsulationUdpData, int nBytes)
439 union olsr_ip_addr dst; /* Destination IP address in captured packet */
440 union olsr_ip_addr src;
441 struct ip *ipHeader; /* The IP header inside the captured IP packet */
442 struct ip6_hdr *ipHeader6; /* The IP header inside the captured IP packet */
443 struct udphdr *udpHeader;
446 if ((encapsulationUdpData[0] & 0xf0) == 0x40) { //IPV4
448 ipHeader = (struct ip *)ARM_NOWARN_ALIGN(encapsulationUdpData);
450 dst.v4 = ipHeader->ip_dst;
451 src.v4 = ipHeader->ip_src;
453 /* Only forward multicast packets. If configured, also forward local broadcast packets */
454 if (IsMulticast(&dst)) {
459 if (ipHeader->ip_p != SOL_UDP) {
461 //OLSR_PRINTF(1,"NON UDP PACKET\n");
464 udpHeader = (struct udphdr *)ARM_NOWARN_ALIGN(encapsulationUdpData + GetIpHeaderLength(encapsulationUdpData));
465 destPort = ntohs(udpHeader->dest);
466 if (destPort != 5353) {
470 if(((u_int8_t) ipHeader->ip_ttl) <= ((u_int8_t) 1)) { // Discard mdns packet with TTL limit 1 or less
471 OLSR_PRINTF(1,"Discarding packet captured with TTL = 1\n");
476 if (isInFilteredList(&src)) {
477 OLSR_PRINTF(1,"Discarding packet captured because of filtered hosts ACL\n");
483 else if ((encapsulationUdpData[0] & 0xf0) == 0x60) { //IPv6
485 ipHeader6 = (struct ip6_hdr *)ARM_NOWARN_ALIGN(encapsulationUdpData);
487 //TODO: mettere dentro src.v6 l'indirizzo IPv6
489 if (ipHeader6->ip6_dst.s6_addr[0] == 0xff) //Multicast
493 return; //not multicast
495 if (ipHeader6->ip6_nxt != SOL_UDP) {
497 //OLSR_PRINTF(1,"NON UDP PACKET\n");
500 udpHeader = (struct udphdr *)ARM_NOWARN_ALIGN(encapsulationUdpData + 40);
501 destPort = ntohs(udpHeader->dest);
502 if (destPort != 5353) {
506 if(((uint8_t) ipHeader6->ip6_hops) <= ((uint8_t) 1)) { // Discard mdns packet with hop limit 1 or less
507 OLSR_PRINTF(1,"Discarding packet captured with TTL = 1\n");
512 if (isInFilteredList(&src)) {
513 OLSR_PRINTF(1,"Discarding packet captured because of filtered hosts ACL\n");
519 return; //Is not IP packet
521 /* Check if the frame is captured on an OLSR-enabled interface */
522 //isFromOlsrIntf = (intf->olsrIntf != NULL); TODO: put again this check
524 // send the packet to OLSR forward mechanism
525 olsr_mdns_gen(encapsulationUdpData, nBytes);
526 } /* BmfPacketCaptured */
529 /* -------------------------------------------------------------------------
531 * Description: This function is registered with the OLSR scheduler and called when something is captured
536 * ------------------------------------------------------------------------- */
538 DoMDNS(int skfd, void *data __attribute__ ((unused)), unsigned int flags __attribute__ ((unused)))
540 unsigned char rxBuffer[BMF_BUFFER_SIZE];
542 struct sockaddr_ll pktAddr;
543 socklen_t addrLen = sizeof(pktAddr);
545 unsigned char *ipPacket;
546 struct TBmfInterface *walker;
548 /* Receive the captured Ethernet frame, leaving space for the BMF
549 * encapsulation header */
550 ipPacket = GetIpPacket(rxBuffer);
551 nBytes = recvfrom(skfd, ipPacket, BMF_BUFFER_SIZE, //TODO: understand how to change this
552 0, (struct sockaddr *)&pktAddr, &addrLen);
558 /* if (nBytes < 0) */
559 /* Check if the number of received bytes is large enough for an IP
560 * packet which contains at least a minimum-size IP header.
561 * Note: There is an apparent bug in the packet socket implementation in
562 * combination with VLAN interfaces. On a VLAN interface, the value returned
563 * by 'recvfrom' may (but need not) be 4 (bytes) larger than the value
564 * returned on a non-VLAN interface, for the same ethernet frame. */
565 if (nBytes < (int)sizeof(struct ip)) {
568 // "%s: captured frame too short (%d bytes) on \"%s\"\n",
576 for(walker = BmfInterfaces; walker != NULL; walker = walker->next){ //if the router isn't the master for this interface
577 if(skfd == walker->capturingSkfd && walker->isActive == 0) { //discard mdns packets
578 OLSR_PRINTF(1,"Not capturing mDNS packet from interface %s because this router is not master\n",walker->ifName);
583 if (pktAddr.sll_pkttype == PACKET_OUTGOING ||
584 pktAddr.sll_pkttype == PACKET_MULTICAST || pktAddr.sll_pkttype == PACKET_BROADCAST) {
585 /* A multicast or broadcast packet was captured */
589 // "%s: captured frame (%d bytes) on \"%s\"\n",
593 //BmfPacketCaptured(walker, pktAddr.sll_pkttype, rxBuffer);
594 BmfPacketCaptured(ipPacket, nBytes);
596 } /* if (pktAddr.sll_pkttype == ...) */
597 } /* if (skfd >= 0 && (FD_ISSET...)) */
601 InitMDNS(struct interface_olsr *skipThisIntf)
603 //Tells OLSR to launch olsr_parser when the packets for this plugin arrive
604 olsr_parser_add_function(&olsr_parser, PARSER_TYPE);
605 //Creates captures sockets and register them to the OLSR scheduler
606 CreateBmfNetworkInterfaces(skipThisIntf);
607 InitRouterList(NULL);
612 /* -------------------------------------------------------------------------
613 * Function : CloseMDNS
614 * Description: Close the MDNS plugin and clean up
619 * ------------------------------------------------------------------------- */
623 CloseBmfNetworkInterfaces();
626 void DoElection(int skfd, void *data __attribute__ ((unused)), unsigned int flags __attribute__ ((unused)))
628 static const char * rxBufferPrefix = "$REP";
629 static const ssize_t rxBufferPrefixLength = 4;
630 unsigned char rxBuffer[HELLO_BUFFER_SIZE];
632 union olsr_sockaddr sender;
633 socklen_t senderSize = sizeof(sender);
634 struct RtElHelloPkt *rcvPkt;
635 struct RouterListEntry *listEntry;
636 struct RouterListEntry6 *listEntry6;
638 OLSR_PRINTF(1,"Packet Received \n");
641 memset(&sender, 0, senderSize);
642 rxCount = recvfrom(skfd, &rxBuffer[0], (sizeof(rxBuffer) - 1), 0,
643 (struct sockaddr *)&sender, &senderSize);
645 BmfPError("Receive error in %s, ignoring message.", __func__);
649 /* make sure the string is null terminated */
650 rxBuffer[rxCount] = '\0';
652 /* do not process when this message doesn't start with $REP */
653 if ((rxCount < rxBufferPrefixLength) || (strncmp((char *) rxBuffer,
654 rxBufferPrefix, rxBufferPrefixLength) != 0))
657 if ( rxCount < (int)sizeof(struct RtElHelloPkt))
658 return; // too small to be a hello pkt
660 rcvPkt = (struct RtElHelloPkt *)ARM_NOWARN_ALIGN(rxBuffer);
662 if (rcvPkt->ipFamily == AF_INET){
663 listEntry = (struct RouterListEntry *)malloc(sizeof(struct RouterListEntry));
664 if(ParseElectionPacket(rcvPkt, listEntry, skfd)){
665 OLSR_PRINTF(1,"processing ipv4 packet \n");
666 if(UpdateRouterList(listEntry))
671 return; //packet not valid
675 listEntry6 = (struct RouterListEntry6 *)malloc(sizeof(struct RouterListEntry6));
676 if(ParseElectionPacket6(rcvPkt, listEntry6, skfd)){
677 OLSR_PRINTF(1,"processing ipv6 packet");
678 if(UpdateRouterList6(listEntry6))
683 return; //packet not valid