diff options
author | Simon Rettberg | 2018-11-16 10:42:22 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-11-16 10:42:22 +0100 |
commit | a28448bce13f0d3c71e0b11e3d7c33663d1a2ee9 (patch) | |
tree | 86399f871ee2fa9314e6e6fbf004c684ea859fb9 /src/server/net.c | |
parent | [SERVER] Fix json format string (diff) | |
download | dnbd3-a28448bce13f0d3c71e0b11e3d7c33663d1a2ee9.tar.gz dnbd3-a28448bce13f0d3c71e0b11e3d7c33663d1a2ee9.tar.xz dnbd3-a28448bce13f0d3c71e0b11e3d7c33663d1a2ee9.zip |
[SERVER] Only set BGR flag in handshake for BGR_FULL
_backgroundReplication was still treated as a boolean flag, so a server
with BGR_NONE would reject a server with BGR_HASHBLOCK. While this still
forces the BGR_NONE proxy to replicate more than it normally would, it
seems reasonable to allow this.
Diffstat (limited to 'src/server/net.c')
-rw-r--r-- | src/server/net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/net.c b/src/server/net.c index 864d260..dcdbaea 100644 --- a/src/server/net.c +++ b/src/server/net.c @@ -239,7 +239,7 @@ void* net_handleNewConnection(void *clientPtr) if ( !client->isServer || !_isProxy ) { // Is a normal client, or we're not proxy image = image_getOrLoad( image_name, rid ); - } else if ( !_backgroundReplication && ( flags & FLAGS8_BG_REP ) ) { + } else if ( _backgroundReplication != BGR_FULL && ( flags & FLAGS8_BG_REP ) ) { // We're a proxy, client is another proxy, we don't do BGR, but connecting proxy does... // Reject, as this would basically force this proxy to do BGR too. image = image_get( image_name, rid, true ); |