Skip to content

Commit 6f52b97

Browse files
committed
print ERROR message if SO_ATTACH_FILTER failed due to e2BIG (out of memeory)
1 parent 357a429 commit 6f52b97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hcxdumptool.c

+1
Original file line numberDiff line numberDiff line change
@@ -4077,6 +4077,7 @@ if(setsockopt(fd_socket_rx, SOL_PACKET, PACKET_IGNORE_OUTGOING, &enable, sizeof(
40774077
if(bpf.len > 0)
40784078
{
40794079
if(setsockopt(fd_socket_rx, SOL_SOCKET, SO_ATTACH_FILTER, &bpf, sizeof(bpf)) < 0)
4080+
fprintf(stderr, "failed to attach BPF (SO_ATTACH_FILTER): %s\n", strerror(errno));
40804081
#ifdef HCXDEBUG
40814082
fprintf(fh_debug, "SO_ATTACH_FILTER failed: %s\n", strerror(errno));
40824083
#endif

0 commit comments

Comments
 (0)