summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-04-10 16:08:18 +0000
committerChristian Pointner <equinox@anytun.org>2008-04-10 16:08:18 +0000
commit1daa77c167b97bf7b6047bd3deb1f4c68e3416e2 (patch)
tree12a772c7a82aa95ac4676d7b5b6176cb87c67b4b
parentcipher added mux to senderid for crypto (diff)
fixed wireshark lua script with ethernet tunneling
pointer check @ plain packet
-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"
}