Actions
Bug #917
closed1.4.5: decode-ipv6.c: void function cannot return value
Affected Versions:
Effort:
Difficulty:
Label:
Description
This output:
"decode-ipv6.c", line 562: void function cannot return value "decode-ipv6.c", line 565: void function cannot return value "decode-ipv6.c", line 569: void function cannot return value "decode-ipv6.c", line 572: void function cannot return value "decode-ipv6.c", line 575: void function cannot return value "decode-ipv6.c", line 577: void function cannot return value cc: acomp failed for decode-ipv6.c
happens because of:
558 switch(IPV6_GET_NH(p)) { 559 case IPPROTO_TCP: 560 IPV6_SET_L4PROTO (p, IPPROTO_TCP); 561 return DecodeTCP(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 562 case IPPROTO_UDP: 563 IPV6_SET_L4PROTO (p, IPPROTO_UDP); 564 return DecodeUDP(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 565 break; 566 case IPPROTO_ICMPV6: 567 IPV6_SET_L4PROTO (p, IPPROTO_ICMPV6); 568 return DecodeICMPV6(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 569 case IPPROTO_SCTP: 570 IPV6_SET_L4PROTO (p, IPPROTO_SCTP); 571 return DecodeSCTP(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 572 case IPPROTO_IPIP: 573 IPV6_SET_L4PROTO(p, IPPROTO_IPIP); 574 return DecodeIPv4inIPv6(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 575 case IPPROTO_IPV6: 576 return DecodeIP6inIP6(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 577 case IPPROTO_FRAGMENT:
I suggest changing it to having the return on a separate line. I removed the unrequired 'break' in line 565 above.
557 /* now process the Ext headers and/or the L4 Layer */ 558 switch(IPV6_GET_NH(p)) { 559 case IPPROTO_TCP: 560 IPV6_SET_L4PROTO (p, IPPROTO_TCP); 561 DecodeTCP(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 562 return; 563 case IPPROTO_UDP: 564 IPV6_SET_L4PROTO (p, IPPROTO_UDP); 565 DecodeUDP(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 566 return; 567 case IPPROTO_ICMPV6: 568 IPV6_SET_L4PROTO (p, IPPROTO_ICMPV6); 569 DecodeICMPV6(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 570 return; 571 case IPPROTO_SCTP: 572 IPV6_SET_L4PROTO (p, IPPROTO_SCTP); 573 DecodeSCTP(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 574 return; 575 case IPPROTO_IPIP: 576 IPV6_SET_L4PROTO(p, IPPROTO_IPIP); 577 DecodeIPv4inIPv6(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 578 return; 579 case IPPROTO_IPV6: 580 DecodeIP6inIP6(tv, dtv, p, pkt + IPV6_HEADER_LEN, IPV6_GET_PLEN(p), pq); 581 return; 582 case IPPROTO_FRAGMENT: 583 case IPPROTO_HOPOPTS:
Updated by Mark Solaris over 11 years ago
More of the same issue:
"util-radix-tree.c", line 1313: void function cannot return value "util-radix-tree.c", line 1327: void function cannot return value "util-radix-tree.c", line 1342: void function cannot return value "util-radix-tree.c", line 1356: void function cannot return value "util-radix-tree.c", line 1371: void function cannot return value
Updated by Eric Leblond over 11 years ago
- Assignee set to Eric Leblond
Taking this bug. I will provide a global fix.
Updated by Eric Leblond over 11 years ago
- % Done changed from 0 to 90
Fix pushed in https://github.com/inliniac/suricata/pull/494
Updated by Eric Leblond over 11 years ago
Fixed in master-1.4.x by PR https://github.com/inliniac/suricata/pull/495
Updated by Victor Julien about 11 years ago
- Status changed from New to Closed
- % Done changed from 90 to 100
Merged pr/494, thanks Eric. Opened a separate ticket for 1.4.x #938.
Actions