[MEDIUM] ebtree: upgrade to version 6.0

This version adds support for prefix-based matching of memory blocks,
as well as some code-size and performance improvements on the generic
code. It provides a prefix insertion and longest match which are
compatible with the rest of the common features (walk, duplicates,
delete, ...). This is typically used for network address matching. The
longest-match code is a bit slower than the original memory block
handling code, so they have not been merged together into generic
code. Still it's possible to perform about 10 million networks lookups
per second in a set of 50000, so this should be enough for most usages.

This version also fixes some bugs in parts that were not used, so there
is no need to backport them.
diff --git a/ebtree/eb64tree.c b/ebtree/eb64tree.c
index 1abb4c8..3d18fb2 100644
--- a/ebtree/eb64tree.c
+++ b/ebtree/eb64tree.c
@@ -1,6 +1,7 @@
 /*
  * Elastic Binary Trees - exported functions for operations on 64bit nodes.
- * (C) 2002-2007 - Willy Tarreau <w@1wt.eu>
+ * Version 6.0
+ * (C) 2002-2010 - Willy Tarreau <w@1wt.eu>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -97,7 +98,7 @@
 			 * small and we need to get its highest value, or it is
 			 * too large, and we need to get the prev value.
 			 */
-			if ((node->key >> node->node.bit) > (x >> node->node.bit)) {
+			if ((node->key >> node->node.bit) < (x >> node->node.bit)) {
 				troot = node->node.branches.b[EB_RGHT];
 				return eb64_entry(eb_walk_down(troot, EB_RGHT), struct eb64_node, node);
 			}