summaryrefslogtreecommitdiffstats
path: root/btime_int.h
diff options
context:
space:
mode:
authorNate Straz <nstraz@redhat.com>2006-08-03 14:48:40 +0000
committerNathan Straz <nstraz@redhat.com>2008-09-23 09:37:46 -0400
commitd1b5e0346ac271397d4d1df2417c3378f46ef4cb (patch)
treec2a2dde809428605f4cafaa604483feec1f49df8 /btime_int.h
parentc750cf3977831da3646bbfa0085147c27f4422ce (diff)
downloadqarsh-d1b5e0346ac271397d4d1df2417c3378f46ef4cb.tar.gz
qarsh-d1b5e0346ac271397d4d1df2417c3378f46ef4cb.tar.xz
qarsh-d1b5e0346ac271397d4d1df2417c3378f46ef4cb.zip
Add cookies to the heartbeat packet for added safety.v1.10-1
Two factors forced this change. 1. ports were being re-used so quickly that we could get lingering packets from past hosts when getting the btime for a new host. 2. We can't control which IP a btime response is sent from if a system has more than one interface. Adding a cookie allows us to know that a response came from whom we sent it.
Diffstat (limited to 'btime_int.h')
-rw-r--r--btime_int.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/btime_int.h b/btime_int.h
index b2cafcd..73adaa4 100644
--- a/btime_int.h
+++ b/btime_int.h
@@ -9,4 +9,6 @@
#define BTIME_MSGLEN 128
#define MAX_RETRY 5
+#define COOKIE_RANDOM_PARTS 4
+#define COOKIE_LEN (3 + (COOKIE_RANDOM_PARTS * sizeof(int)))
#endif /* __BTIME_INT_H */