瀏覽代碼

circpad: some more logging changes.

- Add an info log when receiving a STOP command.
- Keep warning if we receive padding from a wrong hop.
George Kadianakis 5 年之前
父節點
當前提交
5aa526c2d8
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/core/or/circuitpadding.c

+ 3 - 1
src/core/or/circuitpadding.c

@@ -2449,6 +2449,8 @@ circpad_handle_padding_negotiate(circuit_t *circ, cell_t *cell)
     /* Free the machine corresponding to this machine type */
     if (free_circ_machineinfos_with_machine_num(circ,
                 negotiate->machine_type)) {
+      log_info(LD_CIRC, "Received STOP command for machine %u",
+               negotiate->machine_type);
       goto done;
     }
     log_fn(LOG_PROTOCOL_WARN, LD_CIRC,
@@ -2498,7 +2500,7 @@ circpad_handle_padding_negotiated(circuit_t *circ, cell_t *cell,
 
   /* Verify this came from the expected hop */
   if (!circpad_padding_is_from_expected_hop(circ, layer_hint)) {
-    log_fn(LOG_PROTOCOL_WARN, LD_CIRC,
+    log_fn(LOG_WARN, LD_CIRC,
            "Padding negotiated cell from wrong hop!");
     return -1;
   }