]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
ipv6: fix dst/hop header option parsing
authorVictor Julien <victor@inliniac.net>
Thu, 7 Aug 2014 13:02:56 +0000 (15:02 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 7 Aug 2014 13:02:56 +0000 (15:02 +0200)
The extension header option parsing used a uint8_t internally. However
much bigger option sizes are valid.

src/decode-ipv6.c

index 3bbbc5a9cd8c4038b33921b3b8b04c37739e6555..aad3099b1f0a7634725edbe88f5387ce34f0502e 100644 (file)
@@ -212,7 +212,7 @@ DecodeIPV6ExtHdrs(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt
                 IPV6OptHAO *hao = NULL;
                 IPV6OptRA *ra = NULL;
                 IPV6OptJumbo *jumbo = NULL;
-                uint8_t optslen = 0;
+                uint16_t optslen = 0;
 
                 IPV6_SET_L4PROTO(p,nh);
                 hdrextlen =  (*(pkt+1) + 1) << 3;