Skip to content

Commit

Permalink
Print IP in case of version mismatch (#8720)
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Sep 16, 2024
1 parent 290e986 commit 5368dac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ZMQParserInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1789,11 +1789,13 @@ bool ZMQParserInterface::preprocessFlow(ParsedFlow *flow) {
flow->dst_ip.isEmpty())
flow->dst_ip.setVersion(6);
else {
char buf_src[64], buf_dst[64];
invalid_flow = true;

ntop->getTrace()->traceEvent(TRACE_WARNING,
"IP version mismatch: client:%d server:%d - flow will be ignored",
flow->src_ip.getVersion(), flow->dst_ip.getVersion());
"IP version mismatch: client: %s (%d) server: %s (%d) - flow will be ignored",
flow->src_ip.print(buf_src, sizeof(buf_src)), flow->src_ip.getVersion(),
flow->dst_ip.print(buf_dst, sizeof(buf_dst)), flow->dst_ip.getVersion());
}
}
}
Expand Down

0 comments on commit 5368dac

Please sign in to comment.