Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(modern_bpf): recvmsg filler sending empty addres for udp connections #1773

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion driver/SCHEMA_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.19.3
2.19.4
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int BPF_PROG(recvmsg_x,

/* Parameter 4: tuple (type: PT_SOCKTUPLE) */
uint32_t socket_fd = (uint32_t)args[0];
auxmap__store_socktuple_param(auxmap, socket_fd, INBOUND, NULL);
auxmap__store_socktuple_param(auxmap, socket_fd, INBOUND, msghhdr.msg_name);

/* Parameter 5: msg_control (type: PT_BYTEBUF) */
if (msghhdr.msg_control != NULL)
Expand Down
14 changes: 1 addition & 13 deletions test/drivers/test_suites/syscall_exit_suite/recvmsg_x.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,19 +373,7 @@ TEST(SyscallExit, recvmsgX_udp_connection_snaplen)
evt_test->assert_bytebuf_param(3, FULL_MESSAGE, DEFAULT_SNAPLEN);

/* Parameter 4: tuple (type: PT_SOCKTUPLE) */
if(evt_test->is_modern_bpf_engine())
{
/* we are not able to get the sorce ip + port because right now
* we don't use the userspace struct.
*/
evt_test->assert_tuple_inet_param(4, PPM_AF_INET, IPV4_EMPTY, IPV4_SERVER, IPV4_PORT_EMPTY_STRING, IPV4_PORT_SERVER_STRING);
evt_test->assert_num_params_pushed(5);
GTEST_SKIP() << "[RECVMSG_X]: we are not able to get the sorce ip + port because right now we don't use the userspace struct." << std::endl;
}
else
{
evt_test->assert_tuple_inet_param(4, PPM_AF_INET, IPV4_CLIENT, IPV4_SERVER, IPV4_PORT_CLIENT_STRING, IPV4_PORT_SERVER_STRING);
}
evt_test->assert_tuple_inet_param(4, PPM_AF_INET, IPV4_CLIENT, IPV4_SERVER, IPV4_PORT_CLIENT_STRING, IPV4_PORT_SERVER_STRING);

/* Parameter 5: msg_control (type: PT_BYTEBUF) */
evt_test->assert_empty_param(5);
Expand Down
Loading