The RFC 3128 test should be made after the offset mask has been applied.

Reported by:	christos@NetBSD.org
X-MFC with:	r349399
This commit is contained in:
Cy Schubert 2019-06-30 22:32:33 +00:00
parent a9a131902d
commit 23cfb1b256
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=349568

View File

@ -1723,15 +1723,15 @@ ipf_pr_ipv4hdr(fin)
* calculate the byte offset that it represents.
*/
off &= IP_MF|IP_OFFMASK;
if (off == 1 && p == IPPROTO_TCP) {
fin->fin_flx |= FI_SHORT; /* RFC 3128 */
DT1(ipf_fi_tcp_frag_off_1, fr_info_t *, fin);
}
if (off != 0) {
int morefrag = off & IP_MF;
fi->fi_flx |= FI_FRAG;
off &= IP_OFFMASK;
if (off == 1 && p == IPPROTO_TCP) {
fin->fin_flx |= FI_SHORT; /* RFC 3128 */
DT1(ipf_fi_tcp_frag_off_1, fr_info_t *, fin);
}
if (off != 0) {
fin->fin_flx |= FI_FRAGBODY;
off <<= 3;