summaryrefslogtreecommitdiff
path: root/dev/ethertap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dev/ethertap.cc')
-rw-r--r--dev/ethertap.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/dev/ethertap.cc b/dev/ethertap.cc
index fdd2425fc..7589991ef 100644
--- a/dev/ethertap.cc
+++ b/dev/ethertap.cc
@@ -270,7 +270,8 @@ EtherTap::serialize(ostream &os)
{
SERIALIZE_SCALAR(socket);
SERIALIZE_SCALAR(buflen);
- SERIALIZE_ARRAY((uint8_t *)buffer,buflen);
+ uint8_t *buffer = (uint8_t *)this->buffer;
+ SERIALIZE_ARRAY(buffer, buflen);
SERIALIZE_SCALAR(buffer_offset);
SERIALIZE_SCALAR(data_len);
@@ -290,7 +291,8 @@ EtherTap::unserialize(Checkpoint *cp, const std::string &section)
{
UNSERIALIZE_SCALAR(socket);
UNSERIALIZE_SCALAR(buflen);
- UNSERIALIZE_ARRAY((uint8_t *)buffer,buflen);
+ uint8_t *buffer = (uint8_t *)this->buffer;
+ UNSERIALIZE_ARRAY(buffer, buflen);
UNSERIALIZE_SCALAR(buffer_offset);
UNSERIALIZE_SCALAR(data_len);