Nur in batman-0.2.x-fixes: batmand.
@@ -121,9 +121,11 @@
seq_bits[i]=
(seq_bits[i - word_num] << word_offset) +
- /* take the lower port from the left half, shift it left to its final position */
- (seq_bits[i - word_num - 1] >> (WORD_BIT_SIZE-word_offset));
- /* and the upper part of the right half and shift it left to it's position */
+ /* take the lower port from the left half, shift it left to its final position */
+ /*fix: paradoxically uint32_t test = 1234; test<<32;
+ * results in: test == 1234 */
+ ( ( (seq_bits[i - word_num - 1]) >> ((WORD_BIT_SIZE-word_offset)-1) ) >> 1 );
+ /* and the upper part of the right half and shift it left to it's position */
/* for our example that would be: word[0] = 9800 + 0076 = 9876 */
}
/* now for our last word, i==word_num, we only have the it's "left" half. that's the 1000 word in
Nur in batman-0.2.x-fixes: bitarray.c~.
@@ -176,7 +176,11 @@
neigh_node->packet_count = bit_packet_count( neigh_node->seq_bits );
- if ( neigh_node->packet_count > max_packet_count ) {
+
+ /* fix: a node MUST NOT reconfigures its best nexthop
+ * due to new OGMs which were not received via its currently
+ * best-known nexthop.*/
+ if ( neigh_node->packet_count > max_packet_count && neigh_node->addr == neigh ) {
max_packet_count = neigh_node->packet_count;
best_neigh_node = neigh_node;
Nur in batman-0.2.x-fixes: originator.c~.
Gemeinsame Unterverzeichnisse: batman-0.2.x/.svn und batman-0.2.x-fixes/.svn.