olsrd: security fixes for olsrd plugins
[feed/routing.git] / olsrd / patches / 001-Fix-processing-error-for-fragmented-hellos.patch
1 commit bdca59455c9b91b112a5c27eba2ccba3f606797d
2 Author: Henning Rogge <henning.rogge@fkie.fraunhofer.de>
3 Date: Mon Mar 31 11:18:30 2014 +0200
4
5 Fix processing error for fragmented hellos
6
7 diff --git a/src/process_package.c b/src/process_package.c
8 index 780efab..b39b692 100644
9 --- a/src/process_package.c
10 +++ b/src/process_package.c
11 @@ -441,21 +441,15 @@ olsr_hello_tap(struct hello_message *message, struct interface *in_if, const uni
12
13 /* find the input interface in the list of neighbor interfaces */
14 for (walker = message->neighbors; walker != NULL; walker = walker->next) {
15 - if (walker->link != UNSPEC_LINK
16 - && ipequal(&walker->address, &in_if->ip_addr)) {
17 + if (ipequal(&walker->address, &in_if->ip_addr)) {
18 + /*
19 + * memorize our neighbour's idea of the link quality, so that we
20 + * know the link quality in both directions
21 + */
22 + olsr_memorize_foreign_hello_lq(lnk, walker->link != UNSPEC_LINK ? walker : NULL);
23 break;
24 }
25 }
26 -
27 - /*
28 - * memorize our neighbour's idea of the link quality, so that we
29 - * know the link quality in both directions
30 - *
31 - * walker is NULL if there the current interface was not included in
32 - * the message (or was included as an UNSPEC_LINK)
33 - */
34 - olsr_memorize_foreign_hello_lq(lnk, walker);
35 -
36 /* update packet loss for link quality calculation */
37 olsr_received_hello_handler(lnk);
38 }
39 @@ -493,7 +487,7 @@ olsr_hello_tap(struct hello_message *message, struct interface *in_if, const uni
40 if (neighbor->willingness != WILL_NEVER)
41 process_message_neighbors(neighbor, message);
42
43 - /* Process changes immedeatly in case of MPR updates */
44 + /* Process changes immediately in case of MPR updates */
45 olsr_process_changes();
46
47 olsr_free_hello_packet(message);