Fix network iface data type handling #23209
Merged
+46
−44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (WIP)
This PR adds the changes to solve the following issues:
The findings are mentioned here #21296 (comment)
Logs/Alerts example
Fix syscollector local database binding
The field affected for being greater than the UINT_MAX limit is fixed now.
UINT values are now cast to int64_t
Note
#21340
Fix data type handling for delta events
Correctly stored in database
Delta messages
Fix data type handling for sync events
WDB query after sync message from agent 2. mtu value is correct.
2024/05/02 11:52:12 wazuh-db[23284] wdb_parser.c:261 at wdb_parse(): DEBUG: Agent 002 query: syscollector_network_iface save2 {"attributes":{"adapter":"Software Loopback Interface 1","checksum":"e4a92faeea2613dab29a772ec7f3540be951b478","item_id":"56e07d1bb3aeca5febd3a26616defa115f6a881b","mac":"00:00:00:00:00:00","mtu":4294967295,"name":"Loopback Pseudo-Interface 1","rx_bytes":0,"rx_dropped":0,"rx_errors":0,"rx_packets":0,"scan_time":"2024/05/02 14:52:12","state":"up","tx_bytes":0,"tx_dropped":0,"tx_errors":0,"tx_packets":0,"type":" "},"index":"56e07d1bb3aeca5febd3a26616defa115f6a881b","timestamp":""}
WDB query after sync messages from agent 1. rx_bytes, and tx_bytes are correct.
Values properly stored in agent database
Tests
Integration test failing in 4.9.0
Fix failed wazuh-db integration tests in 4.9.0 #23201
Vulnerability detector error
https://github.com/wazuh/wazuh/pull/23209/checks?check_run_id=24556296572
This is due to recent content changes that need the modifications already present in 4.8.0
wazuh/src/wazuh_modules/vulnerability_scanner/src/databaseFeedManager/databaseFeedManager.hpp
Lines 659 to 672 in 71d5e64