mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-13 15:47:15 +03:00
document choice for UDP buffer management
This commit is contained in:
parent
368f286ce5
commit
ac3b43d4bd
@ -260,7 +260,9 @@ int udp_extern_forward(int sockfd) {
|
||||
ssize_t len;
|
||||
socklen_t addrlen;
|
||||
int res, target, out = -1;
|
||||
char data[65536]; /* TODO what's right, here? */
|
||||
char data[65536]; /* Theoritical max is 65507 (https://en.wikipedia.org/wiki/User_Datagram_Protocol).
|
||||
This will do. Dynamic allocation is possible with the MSG_PEEK flag in recvfrom(2), but that'd imply
|
||||
malloc/free overhead for each packet, when really 64K is not that much */
|
||||
|
||||
fprintf(stderr, "recvfrom(%d)\n", getpid());
|
||||
addrlen = sizeof(src_addr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user