Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

increase msg_control buffer size #52

Merged
merged 1 commit into from
Feb 12, 2024
Merged

increase msg_control buffer size #52

merged 1 commit into from
Feb 12, 2024

Conversation

gfantom
Copy link
Collaborator

@gfantom gfantom commented Feb 9, 2024

fixes malformed vec when recvmsg buffer_size is too large

fixes malformed vec when recvmsg buffer_size is too large
@@ -303,7 +303,7 @@ int tcpd_recv(int socket, void *f_mbuf, size_t n, int flags, struct thread *t) {
client_fd = socket;

char buf_dummy[n];
char offsetbuf[CMSG_SPACE(sizeof(int) * 1000)];
char offsetbuf[CMSG_SPACE(sizeof(iov) * 10000)];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fairly large for stack allocation. But for userspace stacks, I suppose it's okay.

@gfantom gfantom merged commit 06a287f into tcpd Feb 12, 2024
1 check passed
@gfantom gfantom deleted the fix_devmemvec_workaround branch February 12, 2024 19:40
@mina
Copy link

mina commented Feb 23, 2024

looks good to me.

gfantom added a commit that referenced this pull request Jun 25, 2024
gfantom added a commit that referenced this pull request Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants