]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
Early exit when checking if ip6 reassembled packet is valid.
authorIvan Delamer <delamer@inicotech.com>
Fri, 2 Mar 2012 16:18:54 +0000 (09:18 -0700)
committerIvan Delamer <delamer@inicotech.com>
Fri, 2 Mar 2012 16:18:54 +0000 (09:18 -0700)
src/core/ipv6/ip6_frag.c

index 1e6304eec5424c626a960222d7d5c46e1433c16e..a43fd614195aaa411a2bb067fdaf2be12da041dd 100644 (file)
@@ -443,7 +443,7 @@ ip6_reass(struct pbuf *p)
   /* Final validity test: no gaps between current and last fragment. */
   iprh_prev = iprh;
   q = iprh->next_pbuf;
-  while (q != NULL) {
+  while ((q != NULL) && valid) {
     iprh = (struct ip6_reass_helper*)q->payload;
     if (iprh_prev->end != iprh->start) {
       valid = 0;