olsrd: bugfix patch, Fix processing error for fragmented hellos
authorSaverio Proto <zioproto@gmail.com>
Mon, 31 Mar 2014 11:59:11 +0000 (13:59 +0200)
committerSaverio Proto <zioproto@gmail.com>
Mon, 31 Mar 2014 11:59:11 +0000 (13:59 +0200)
olsrd/Makefile
olsrd/patches/001-Fix-processing-error-for-fragmented-hellos.patch [new file with mode: 0644]

index 8643370d33babec01dd8f90bce3a4c0bf3424f05..0f3f90f574d4915705a6f577cd3bf5587c7afec9 100644 (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
diff --git a/olsrd/patches/001-Fix-processing-error-for-fragmented-hellos.patch b/olsrd/patches/001-Fix-processing-error-for-fragmented-hellos.patch
new file mode 100644 (file)
index 0000000..a1bc5a7
--- /dev/null
@@ -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);