]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
push-update-server: comment about buf_string_compare_advance() usage in send_single_p...
authorMarco Baffo <marco@mandelbit.com>
Fri, 12 Sep 2025 13:15:19 +0000 (15:15 +0200)
committerGert Doering <gert@greenie.muc.de>
Fri, 12 Sep 2025 15:33:21 +0000 (17:33 +0200)
Change-Id: I73f8ad9bf105920f4bde357ea9dcf0e485f3f3cb
Signed-off-by: Marco Baffo <marco@mandelbit.com>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20250912131519.43222-1-frank@lichtenheld.com>
URL: https://sourceforge.net/p/openvpn/mailman/message/59232447/
URL: https://gerrit.openvpn.net/c/openvpn/+/1177
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/push_util.c

index bd3992be6672de8adfafa84174e291db40ad63cb..f7a4fca6ff2524c6468cf6f86909b29a1d81b36f 100644 (file)
@@ -161,6 +161,10 @@ send_single_push_update(struct context *c, struct buffer *msgs, unsigned int *op
          * will not be routed towards the client.
          * For the same reason we later update the vhash too in
          * `send_push_update()` function.
+         * Using `buf_string_compare_advance()` we mimic the behavior
+         * inside `process_incoming_push_msg()`. However, we don't need
+         * to check the return value here because we just want to `advance`,
+         * meaning we skip the `push_update_cmd' we added earlier.
          */
         buf_string_compare_advance(&msgs[i], push_update_cmd);
         if (process_incoming_push_update(c, pull_permission_mask(c), option_types_found, &msgs[i], true) == PUSH_MSG_ERROR)