Add map_check on 'status' action

This makes static maps behave on par with the list operation.

Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
This commit is contained in:
Kazunori INOUE 2011-09-19 16:19:10 -04:00 committed by Lon Hohberger
parent 2118df11fa
commit b51aab4de9
2 changed files with 10 additions and 0 deletions

View File

@ -293,6 +293,11 @@ do_fence_request_tcp(fence_req_t *req, mcast_info *info)
req->seqno, info->priv);
break;
case FENCE_STATUS:
if (map_check(info->map, ip_addr_src,
(const char *)req->domain) == 0) {
response = RESP_PERM;
break;
}
response = info->cb->status((char *)req->domain, info->priv);
break;
case FENCE_DEVSTATUS:

View File

@ -211,6 +211,11 @@ do_fence_request(int fd, const char *src, serial_req_t *req, serial_info *info)
req->seqno, info->priv);
break;
case FENCE_STATUS:
if (map_check(info->maps, src,
(const char *)req->domain) == 0) {
response = RESP_PERM;
break;
}
response = info->cb->status((char *)req->domain, info->priv);
break;
case FENCE_DEVSTATUS: