]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
circpad: some more logging changes.
authorGeorge Kadianakis <desnacked@riseup.net>
Tue, 11 Jun 2019 11:28:38 +0000 (14:28 +0300)
committerGeorge Kadianakis <desnacked@riseup.net>
Tue, 11 Jun 2019 11:28:38 +0000 (14:28 +0300)
- Add an info log when receiving a STOP command.
- Keep warning if we receive padding from a wrong hop.

src/core/or/circuitpadding.c

index ebad6518b61e5813fe2bb372f4cdd827bd2a1c18..7521fd33949aa45ec6c1fd6e8535fa53062f3515 100644 (file)
@@ -2821,6 +2821,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,
@@ -2871,7 +2873,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;
   }