fix the bug ipv6 header decoder

This commit is contained in:
Sukchan Lee 2017-12-16 13:25:09 +09:00
parent 52b2125538
commit ba5687de1b
1 changed files with 4 additions and 1 deletions

View File

@ -190,7 +190,7 @@ static status_t decode_ipv6_header(
} }
} }
while(p < endp && !done) while(p < endp)
{ {
struct ip6_ext *ext = (struct ip6_ext *)p; struct ip6_ext *ext = (struct ip6_ext *)p;
switch(nxt) switch(nxt)
@ -216,6 +216,9 @@ static status_t decode_ipv6_header(
break; break;
} }
if (done)
break;
nxt = ext->ip6e_nxt; nxt = ext->ip6e_nxt;
} }