Squashed commit of the following:
commit
e8ec31370c4c9ca5160d0e739753e7c9666b8b8e
Author: Russ Combs <rucombs@cisco.com>
Date: Thu May 4 18:12:11 2017 -0400
fix extraction of ether type from cisco metadata
}
codec.lyr_len = cmdh->length << 3;
+
//The last 2 octets of the header will be the real ethtype
- codec.next_prot_id =
- static_cast<ProtocolId>(ntohs(*(raw.data + codec.lyr_len - sizeof(uint16_t))));
+ codec.next_prot_id = static_cast<ProtocolId>
+ (ntohs(*((uint16_t*)(raw.data + codec.lyr_len - sizeof(uint16_t)))));
+
codec.codec_flags |= CODEC_ETHER_NEXT;
return true;
}