From 1daa77c167b97bf7b6047bd3deb1f4c68e3416e2 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 10 Apr 2008 16:08:18 +0000 Subject: fixed wireshark lua script with ethernet tunneling pointer check @ plain packet --- plainPacket.cpp | 8 ++++++-- wireshark-lua/satp.lua | 2 +- 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(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" } -- cgit v1.2.3