Fixed bugs #51606 and #51535: IPv4 reassembly could be finished although there are holes

(cherry picked from commit 5ea7f507c3)

# Conflicts:
#	test/unit/Filelists.mk
#	test/unit/lwipopts.h
This commit is contained in:
goldsimon
2017-08-02 21:11:53 +02:00
parent c51e6fbb12
commit 1d04b06450
5 changed files with 172 additions and 0 deletions

View File

@@ -380,6 +380,11 @@ ip_reass_chain_frag_into_datagram_and_validate(struct ip_reassdata *ipr, struct
}
#endif /* IP_REASS_CHECK_OVERLAP */
iprh_prev->next_pbuf = new_p;
if (iprh_prev->end != iprh->start) {
/* There is a fragment missing between the current
* and the previous fragment */
valid = 0;
}
} else {
#if IP_REASS_CHECK_OVERLAP
if (iprh->end > iprh_tmp->start) {