mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-01-31 20:29:36 +08:00
do not drop truncated packet if fix_gro enabled
This commit is contained in:
parent
b03ae53df6
commit
b3e06de4cb
@ -840,10 +840,18 @@ int pre_recv_raw_packet()
|
|||||||
//assert(g_addr_ll_size==sizeof(g_addr_ll));
|
//assert(g_addr_ll_size==sizeof(g_addr_ll));
|
||||||
|
|
||||||
if(g_packet_buf_len==max_data_len+1)
|
if(g_packet_buf_len==max_data_len+1)
|
||||||
|
{
|
||||||
|
if(g_fix_gro==0)
|
||||||
{
|
{
|
||||||
mylog(log_warn,"huge packet, data_len %d > %d(max_data_len),dropped\n",g_packet_buf_len,max_data_len);
|
mylog(log_warn,"huge packet, data_len %d > %d(max_data_len),dropped\n",g_packet_buf_len,max_data_len);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mylog(log_debug,"huge packet, data_len %d > %d(max_data_len),not dropped\n",g_packet_buf_len,max_data_len);
|
||||||
|
g_packet_buf_len=max_data_len;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(g_packet_buf_len> single_max_data_len+1)
|
if(g_packet_buf_len> single_max_data_len+1)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user