IPV6MiscTests(snort, codec);
CheckIPV6Multicast(ip6h, codec);
- if (ip6h->is_bad_next_header())
+ if (ip6h->is_valid_next_header() == false)
codec_event(codec, DECODE_IPV6_BAD_NEXT_HEADER);
const_cast<uint32_t&>(raw.len) = ip6h->len() + ip::IP6_HEADER_LEN;
inline bool is_dst_multicast_scope_global() const
{ return (static_cast<MulticastScope>(ip6_dst.u6_addr8[1]) == MulticastScope::GLOBAL); }
- inline bool is_bad_next_header() const
+ inline bool is_valid_next_header() const
{
switch (ip6_next)
{
case IPPROTO_DSTOPTS:
case IPPROTO_ROUTING:
case IPPROTO_FRAGMENT:
- return false;
+ return true;
default:
break;
}
- return true;
+ return false;
}
/* setters */