summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--anytun.cpp7
-rw-r--r--plainPacket.cpp2
2 files changed, 4 insertions, 5 deletions
diff --git a/anytun.cpp b/anytun.cpp
index 03f1eba..925e5dd 100644
--- a/anytun.cpp
+++ b/anytun.cpp
@@ -282,10 +282,9 @@ void* receiver(void* p)
c->decrypt(packet, plain_packet);
// check payload_type and remove it
-//TODO: fix this!
-// if((param->dev.getType() == TunDevice::TYPE_TUN && plain_packet.getPayloadType() != PAYLOAD_TYPE_TUN) ||
-// (param->dev.getType() == TunDevice::TYPE_TAP && plain_packet.getPayloadType() != PAYLOAD_TYPE_TAP))
-// continue;
+ if((param->dev.getType() == TunDevice::TYPE_TUN && plain_packet.getPayloadType() != PAYLOAD_TYPE_TUN) ||
+ (param->dev.getType() == TunDevice::TYPE_TAP && plain_packet.getPayloadType() != PAYLOAD_TYPE_TAP))
+ continue;
// write it on the device
param->dev.write(plain_packet);
diff --git a/plainPacket.cpp b/plainPacket.cpp
index d915a30..a592d38 100644
--- a/plainPacket.cpp
+++ b/plainPacket.cpp
@@ -73,7 +73,7 @@ payload_type_t PlainPacket::getPayloadType() const
void PlainPacket::setPayloadType(payload_type_t payload_type)
{
- payload_type = PAYLOAD_TYPE_T_HTON(payload_type);
+ payload_type_ = PAYLOAD_TYPE_T_HTON(payload_type);
}
void PlainPacket::setLength(u_int32_t length)