]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
More LOG_PROTOCOL_WARN.
authorMike Perry <mikeperry-git@torproject.org>
Wed, 5 Jun 2019 19:33:39 +0000 (12:33 -0700)
committerGeorge Kadianakis <desnacked@riseup.net>
Tue, 23 Jul 2019 09:22:25 +0000 (12:22 +0300)
Make origin-side messages about padding negotiation failure into
LOG_PROTOCOL_WARN.

I'm not sure I like this either.. But the negotiation refusal case might
happen naturally due to consensus drift, and is functionally no different than
a corrupted cell.

src/core/or/circuitpadding.c

index 63281d13683806dd4d8872c73df1a0adf11a920e..8346ea4aed83510d90149eee66530f04faa43a58 100644 (file)
@@ -2433,7 +2433,7 @@ circpad_handle_padding_negotiate(circuit_t *circ, cell_t *cell)
   circpad_negotiate_t *negotiate;
 
   if (CIRCUIT_IS_ORIGIN(circ)) {
-    log_fn(LOG_WARN, LD_CIRC,
+    log_fn(LOG_PROTOCOL_WARN, LD_CIRC,
            "Padding negotiate cell unsupported at origin.");
     return -1;
   }
@@ -2498,7 +2498,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_WARN, LD_CIRC,
+    log_fn(LOG_PROTOCOL_WARN, LD_CIRC,
            "Padding negotiated cell from wrong hop!");
     return -1;
   }
@@ -2524,7 +2524,7 @@ circpad_handle_padding_negotiated(circuit_t *circ, cell_t *cell,
     // and be sad
     free_circ_machineinfos_with_machine_num(circ, negotiated->machine_type);
     TO_ORIGIN_CIRCUIT(circ)->padding_negotiation_failed = 1;
-    log_fn(LOG_INFO, LD_CIRC,
+    log_fn(LOG_PROTOCOL_WARN, LD_CIRC,
            "Middle node did not accept our padding request.");
   }