diff --git a/ccsrc/Protocols/ETH/ethernet_layer.cc b/ccsrc/Protocols/ETH/ethernet_layer.cc index 134d4d7dc6e0985aeedd6c1ca4d12fb2d3551339..33a79e14bc4b1e9bdec8f24257e738ff750b1ca5 100644 --- a/ccsrc/Protocols/ETH/ethernet_layer.cc +++ b/ccsrc/Protocols/ETH/ethernet_layer.cc @@ -68,7 +68,7 @@ void ethernet_layer::receive_data(OCTETSTRING& p_data, params& p_params) { // Extract ethertype OCTETSTRING proto = OCTETSTRING(2, 2 + static_cast<const unsigned char *>(p_data)); //loggers::get_instance().log_msg("ethernet_layer::receive_data: proto: ", proto); - OCTETSTRING data = OCTETSTRING(data.lengthof() - 14, 14 + static_cast<const unsigned char *>(p_data)); + OCTETSTRING data = OCTETSTRING(p_data.lengthof() - 14, 14 + static_cast<const unsigned char *>(p_data)); // Update params CHARSTRING s = oct2str(dst); p_params.insert(std::pair<std::string, std::string>(params::mac_dst, std::string(static_cast<const char *>(s))));