summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plainPacket.cpp8
-rw-r--r--wireshark-lua/satp.lua2
2 files changed, 7 insertions, 3 deletions
diff --git a/plainPacket.cpp b/plainPacket.cpp
index c3aa089..ab9ccea 100644
--- a/plainPacket.cpp
+++ b/plainPacket.cpp
@@ -58,8 +58,12 @@ void PlainPacket::setPayloadType(payload_type_t payload_type)
if(!payload_type_)
return;
- if(payload_type == PAYLOAD_TYPE_TUN)
- {
+ if(payload_type == PAYLOAD_TYPE_TUN) {
+ if(!payload_) {
+ *payload_type_ = PAYLOAD_TYPE_T_HTON(0);
+ return;
+ }
+
struct ip* hdr = reinterpret_cast<struct ip*>(payload_);
if(hdr->ip_v == 4)
*payload_type_ = PAYLOAD_TYPE_T_HTON(PAYLOAD_TYPE_TUN4);
diff --git a/wireshark-lua/satp.lua b/wireshark-lua/satp.lua
index be88557..140f971 100644
--- a/wireshark-lua/satp.lua
+++ b/wireshark-lua/satp.lua
@@ -12,7 +12,7 @@ do
local payload_dissector = {
[0x0800] = "ip",
- [0x6558] = "ethernet",
+ [0x6558] = "eth",
[0x86DD] = "ipv6"
}