GH-1493: Fix build with -DENABLE_MOBILE_IPV6

This commit is contained in:
Tim Wojtulewicz 2021-04-07 13:44:12 -07:00
parent 2f69e32233
commit 6c52fd502f
2 changed files with 3 additions and 3 deletions

View file

@ -245,7 +245,7 @@ RecordValPtr IPv6_Hdr::ToVal(VectorValPtr chain) const
case 5:
{
auto m = make_intrusive<RecordVal>(ip6_mob_bu_type);
m->Assign(0, ntohs(*((uint16_t*)msg_data))));
m->Assign(0, ntohs(*((uint16_t*)msg_data)));
m->Assign(1, static_cast<bool>(ntohs(*((uint16_t*)(msg_data + sizeof(uint16_t)))) & 0x8000));
m->Assign(2, static_cast<bool>(ntohs(*((uint16_t*)(msg_data + sizeof(uint16_t)))) & 0x4000));
m->Assign(3, static_cast<bool>(ntohs(*((uint16_t*)(msg_data + sizeof(uint16_t)))) & 0x2000));

View file

@ -200,9 +200,9 @@ bool IPAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* packet)
// last if present.
if ( packet->ip_hdr->LastHeader() == IPPROTO_MOBILITY )
{
dump_this_packet = true;
packet->dump_packet = true;
if ( ! ignore_checksums && mobility_header_checksum(packet->ip_hdr) != 0xffff )
if ( ! detail::ignore_checksums && mobility_header_checksum(packet->ip_hdr.get()) != 0xffff )
{
Weird("bad_MH_checksum", packet);
return false;