[SCM] CTDB repository - branch 1.2 updated - ctdb-1.0.114-369-g4ae189e
Ronnie Sahlberg
sahlberg at samba.org
Thu Oct 7 22:56:00 MDT 2010
The branch, 1.2 has been updated
via 4ae189e1fb3b013d489828813f2d317c1c85633a (commit)
via b4d7dcf08dca2f6c9863ca9e57b2eb772220c434 (commit)
from 68b3a836d4b39453987acc4a69556f6c4a767bda (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2
- Log -----------------------------------------------------------------
commit 4ae189e1fb3b013d489828813f2d317c1c85633a
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Fri Oct 8 15:51:44 2010 +1100
Spotted by rusty.
Add a missing $
so we delete $_ip and not _ip
commit b4d7dcf08dca2f6c9863ca9e57b2eb772220c434
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Fri Oct 8 13:14:14 2010 +1100
change the hash function to use the much better Jenkins hash
from the tdb library
cq S1020233
-----------------------------------------------------------------------
Summary of changes:
common/ctdb_util.c | 9 +--------
config/events.d/11.natgw | 2 +-
2 files changed, 2 insertions(+), 9 deletions(-)
Changeset truncated at 500 lines:
diff --git a/common/ctdb_util.c b/common/ctdb_util.c
index 4acfa3f..749b9c2 100644
--- a/common/ctdb_util.c
+++ b/common/ctdb_util.c
@@ -99,14 +99,7 @@ bool ctdb_same_address(struct ctdb_address *a1, struct ctdb_address *a2)
*/
uint32_t ctdb_hash(const TDB_DATA *key)
{
- uint32_t value; /* Used to compute the hash value. */
- uint32_t i; /* Used to cycle through random values. */
-
- /* Set the initial value from the key size. */
- for (value = 0x238F13AF * key->dsize, i=0; i < key->dsize; i++)
- value = (value + (key->dptr[i] << (i*5 % 24)));
-
- return (1103515243 * value + 12345);
+ return tdb_jenkins_hash(discard_const(key));
}
/*
diff --git a/config/events.d/11.natgw b/config/events.d/11.natgw
index f8892a9..34aee19 100755
--- a/config/events.d/11.natgw
+++ b/config/events.d/11.natgw
@@ -33,7 +33,7 @@ delete_all() {
iptables -D POSTROUTING -t nat -s $CTDB_NATGW_PRIVATE_NETWORK -d ! $CTDB_NATGW_PRIVATE_NETWORK -j MASQUERADE >/dev/null 2>/dev/null
# remove any iptables rule we may have on this address
- iptables -D INPUT -p tcp --syn -d _ip/32 -j REJECT 2>/dev/null
+ iptables -D INPUT -p tcp --syn -d $_ip/32 -j REJECT 2>/dev/null
}
case "$1" in
--
CTDB repository
More information about the samba-cvs
mailing list