diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/cpuworker.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index b0d3d1c4c0..88a72886eb 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -274,7 +274,10 @@ cpuworker_main(void *data) reply_to_proxy, keys, CPATH_KEY_MATERIAL_LEN) < 0) { /* failure */ log_debug(LD_OR,"onion_skin_server_handshake failed."); - memset(buf,0,LEN_ONION_RESPONSE); /* send all zeros for failure */ + *buf = 0; /* indicate failure in first byte */ + memcpy(buf+1,tag,TAG_LEN); + /* send all zeros as answer */ + memset(buf+1+TAG_LEN, 0, LEN_ONION_RESPONSE-(1+TAG_LEN)); } else { /* success */ log_debug(LD_OR,"onion_skin_server_handshake succeeded."); |