diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-09-17 15:02:51 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2022-09-17 15:02:51 +0000 |
commit | 8cca36db7f4e6bb8ad7842399e227879be393d4b (patch) | |
tree | e26cc57f1da94c64b90ecf6b058ec7671044e9be /sys/src/9 | |
parent | 5a1c1b590d319d58a178c6d299e99142bf7d4433 (diff) |
tcpmssclamp: only check the first ipv4 fragment for tcp header
Diffstat (limited to 'sys/src/9')
-rw-r--r-- | sys/src/9/ip/tcp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/9/ip/tcp.c b/sys/src/9/ip/tcp.c index 86105230c..f6fbf19ed 100644 --- a/sys/src/9/ip/tcp.c +++ b/sys/src/9/ip/tcp.c @@ -3322,6 +3322,8 @@ tcpmssclamp(uchar *p, int n, int mtu) if((h4->vihl&0xF0)==IP_VER4) { if(h4->proto != IP_TCPPROTO) return; + if((h4->frag[0] & (IP_FO>>8)) | (h4->frag[1] & IP_FO)) + return; if(!(h4->tcpflag[1] & SYN)) return; hdrlen = (h4->tcpflag[0] >> 2) & ~3; |