Skip to content

Commit

Permalink
minus extra 20 for mssfix for safe
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu- committed Nov 21, 2017
1 parent 9c299fc commit cd5e0df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion UDPspeeder
4 changes: 2 additions & 2 deletions tun_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ int do_mssfix(char * s,int len)
}
int mss= read_u16(ptr+2);//uint8_t(ptr[2])*256+uint8_t(ptr[3]);
int new_mss=mss;
if(new_mss>g_fec_mtu-40)
if(new_mss>g_fec_mtu-40-20) //minus extra 20 for safe
{
new_mss=g_fec_mtu-40;
new_mss=g_fec_mtu-40-20;
}
write_u16(ptr+2,(unsigned short)new_mss);

Expand Down

0 comments on commit cd5e0df

Please sign in to comment.