martinzink commented on code in PR #1412:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1412#discussion_r980867567
##########
extensions/standard-processors/tests/unit/ListenSyslogTests.cpp:
##########
@@ -197,21 +197,10 @@ constexpr std::string_view rfc5424_logger_example_1 =
R"(<13>1 2022-03-17T10:10:
constexpr std::string_view invalid_syslog = "not syslog";
-void sendUDPPacket(const std::string_view content, uint64_t port) {
- asio::io_context io_context;
- asio::ip::udp::socket socket(io_context);
- asio::ip::udp::endpoint
remote_endpoint(asio::ip::address::from_string("127.0.0.1"), port);
- socket.open(asio::ip::udp::v4());
- std::error_code err;
- socket.send_to(asio::buffer(content, content.size()), remote_endpoint, 0,
err);
- REQUIRE(!err);
- socket.close();
-}
-
void check_for_only_basic_attributes(core::FlowFile& flow_file, uint16_t port,
std::string_view protocol) {
CHECK(std::to_string(port) == flow_file.getAttribute("syslog.port"));
CHECK(protocol == flow_file.getAttribute("syslog.protocol"));
- CHECK("127.0.0.1" == flow_file.getAttribute("syslog.sender"));
+ CHECK(("::ffff:127.0.0.1" == flow_file.getAttribute("syslog.sender") ||
"::1" == flow_file.getAttribute("syslog.sender")));
Review Comment:
the `::ffff:` is a subnet prefix for IPv4 addresses that are placed inside
IPv6.
The UDP/TCP Servers now listen on IPv6 with dual stacking enabled, this
means that the OS listens on ipv4 and ipv6 simultaneously and any request that
comes through ipv4 will be transferred to ipv6's ipv4 subnet, thus `127.0.0.1`
(original sender) will become `::ffff:127.0.0.1`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]