olsrd: bugfix patch, Fix processing error for fragmented hellos

This commit is contained in:
Saverio Proto 2014-03-31 13:59:11 +02:00
parent 3746332038
commit 33c13b7d06
2 changed files with 48 additions and 1 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=olsrd
PKG_VERSION:=0.6.6.1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6

View File

@ -0,0 +1,47 @@
commit bdca59455c9b91b112a5c27eba2ccba3f606797d
Author: Henning Rogge <henning.rogge@fkie.fraunhofer.de>
Date: Mon Mar 31 11:18:30 2014 +0200
Fix processing error for fragmented hellos
diff --git a/src/process_package.c b/src/process_package.c
index 780efab..b39b692 100644
--- a/src/process_package.c
+++ b/src/process_package.c
@@ -441,21 +441,15 @@ olsr_hello_tap(struct hello_message *message, struct interface *in_if, const uni
/* find the input interface in the list of neighbor interfaces */
for (walker = message->neighbors; walker != NULL; walker = walker->next) {
- if (walker->link != UNSPEC_LINK
- && ipequal(&walker->address, &in_if->ip_addr)) {
+ if (ipequal(&walker->address, &in_if->ip_addr)) {
+ /*
+ * memorize our neighbour's idea of the link quality, so that we
+ * know the link quality in both directions
+ */
+ olsr_memorize_foreign_hello_lq(lnk, walker->link != UNSPEC_LINK ? walker : NULL);
break;
}
}
-
- /*
- * memorize our neighbour's idea of the link quality, so that we
- * know the link quality in both directions
- *
- * walker is NULL if there the current interface was not included in
- * the message (or was included as an UNSPEC_LINK)
- */
- olsr_memorize_foreign_hello_lq(lnk, walker);
-
/* update packet loss for link quality calculation */
olsr_received_hello_handler(lnk);
}
@@ -493,7 +487,7 @@ olsr_hello_tap(struct hello_message *message, struct interface *in_if, const uni
if (neighbor->willingness != WILL_NEVER)
process_message_neighbors(neighbor, message);
- /* Process changes immedeatly in case of MPR updates */
+ /* Process changes immediately in case of MPR updates */
olsr_process_changes();
olsr_free_hello_packet(message);