Merge branch 'next'

This commit is contained in:
Sage Weil 2013-06-15 20:48:32 -07:00
commit 9ef6041fe7
2 changed files with 12 additions and 6 deletions

View File

@ -79,13 +79,13 @@ public:
int signal_exit(int r) {
if (forked) {
// tell parent
(void)::write(fd[1], &r, sizeof(r));
(void)safe_write(fd[1], &r, sizeof(r));
}
return r;
}
void exit(int r) {
signal_exit(r);
exit(r);
::exit(r);
}
void daemonize() {

View File

@ -609,10 +609,16 @@ bool OSDMap::is_blacklisted(const entity_addr_t& a) const
return true;
// is entire ip blacklisted?
entity_addr_t b = a;
b.set_port(0);
b.set_nonce(0);
return blacklist.count(b);
if (a.is_ip()) {
entity_addr_t b = a;
b.set_port(0);
b.set_nonce(0);
if (blacklist.count(b)) {
return true;
}
}
return false;
}
void OSDMap::get_blacklist(list<pair<entity_addr_t,utime_t> > *bl) const