From ba5687de1bfea2148fe4e0b565bc8ff959eb245c Mon Sep 17 00:00:00 2001 From: Sukchan Lee Date: Sat, 16 Dec 2017 13:25:09 +0900 Subject: [PATCH] fix the bug ipv6 header decoder --- src/pgw/pgw_ipfw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pgw/pgw_ipfw.c b/src/pgw/pgw_ipfw.c index 20ab0617e..178d1f89a 100644 --- a/src/pgw/pgw_ipfw.c +++ b/src/pgw/pgw_ipfw.c @@ -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; switch(nxt) @@ -216,6 +216,9 @@ static status_t decode_ipv6_header( break; } + if (done) + break; + nxt = ext->ip6e_nxt; }