Fix youtubeUnblock freeze when more than queue_size packets being sent

as fake_sni_seq_len

The problem affects both the userspace version and kernel space one. The
problem was reported in #166 and hopefully #167 also relates to it. The
problem occures because each packet sent by rawsocket is being enqueued
in the nf_queue, but each rawsocket waits for the packet to be
processed by linux kernel network stack. This leads to the infinitily
waiting rawsocket when the queue fullfills.
This commit is contained in:
Vadim Vetrov
2024-10-27 02:41:48 +03:00
parent ae9592c71f
commit aa96769559
2 changed files with 4 additions and 4 deletions

View File

@@ -80,7 +80,7 @@ static int send_raw_ipv4(const uint8_t *pkt, uint32_t pktlen) {
iov.iov_base = (__u8 *)pkt;
iov.iov_len = pktlen;
msg.msg_flags = 0;
msg.msg_flags = MSG_DONTWAIT;
msg.msg_name = &daddr;
msg.msg_namelen = sizeof(struct sockaddr_in);
msg.msg_control = NULL;
@@ -140,7 +140,7 @@ static int send_raw_ipv6(const uint8_t *pkt, uint32_t pktlen) {
iov.iov_base = (__u8 *)pkt;
iov.iov_len = pktlen;
msg.msg_flags = 0;
msg.msg_flags = MSG_DONTWAIT;
msg.msg_name = &daddr;
msg.msg_namelen = sizeof(struct sockaddr_in6);
msg.msg_control = NULL;