From c34d951a40ebbe808c5158d8877c23a6789afee0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 28 Jun 2024 17:39:56 +0200 Subject: [PATCH] translation/server/Response: add ALLOW_REMOTE_NETWORK support --- src/translation/server/Response.hxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/translation/server/Response.hxx b/src/translation/server/Response.hxx index 8ba3c28c3..73e28b177 100644 --- a/src/translation/server/Response.hxx +++ b/src/translation/server/Response.hxx @@ -371,6 +371,13 @@ public: return Packet(TranslationCommand::DISCARD_QUERY_STRING); } + auto &AllowRemoteNetwork(SocketAddress address, + const uint8_t &prefix_length) noexcept { + return MultiPacket(TranslationCommand::ALLOW_REMOTE_NETWORK, + static_cast>(address), + std::span{&prefix_length, 1}); + } + struct RedirectContext { Response &response;