Changeset ec240f3789e4102e71fe1246fbff2af5f6fb3dc2
- Timestamp:
- 03/16/09 19:44:52
(4 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1237232692 +0000
- git-parent:
[5b175f1d6f70b127b0df3c66d53fff4ec99c769b]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1237232692 +0000
- Message:
make ping cognizant of generation gaps on checks, fixes #107
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r022695f |
rec240f3 |
|
| 45 | 45 | struct ping_payload { |
|---|
| 46 | 46 | uuid_t checkid; |
|---|
| | 47 | u_int32_t generation; |
|---|
| 47 | 48 | struct timeval whence; |
|---|
| 48 | 49 | int check_no; |
|---|
| … | … | |
| 154 | 155 | } from; |
|---|
| 155 | 156 | unsigned int from_len; |
|---|
| 156 | | struct ip *ip = (struct ip *)packet;; |
|---|
| | 157 | struct ip *ip = (struct ip *)packet; |
|---|
| 157 | 158 | struct icmp *icp; |
|---|
| 158 | 159 | struct ping_payload *payload; |
|---|
| … | … | |
| 193 | 194 | } |
|---|
| 194 | 195 | check = noit_poller_lookup(payload->checkid); |
|---|
| | 196 | /* make sure this check is from this generation! */ |
|---|
| 195 | 197 | if(!check) { |
|---|
| 196 | 198 | char uuid_str[37]; |
|---|
| … | … | |
| 198 | 200 | noitLT(nlerr, now, |
|---|
| 199 | 201 | "ping_icmp response for unknown check '%s'\n", uuid_str); |
|---|
| | 202 | continue; |
|---|
| | 203 | } |
|---|
| | 204 | if(check->generation != payload->generation) { |
|---|
| | 205 | noitLT(nldeb, now, |
|---|
| | 206 | "ping_icmp response in generation gap\n"); |
|---|
| 200 | 207 | continue; |
|---|
| 201 | 208 | } |
|---|
| … | … | |
| 427 | 434 | |
|---|
| 428 | 435 | uuid_copy(payload->checkid, check->checkid); |
|---|
| | 436 | payload->generation = check->generation; |
|---|
| 429 | 437 | payload->check_no = ci->check_no; |
|---|
| 430 | 438 | payload->check_pack_no = i; |
|---|