From ea1d14f000e3b4e82e711285b5746ac464cf92d7 Mon Sep 17 00:00:00 2001 From: drochner Date: Sun, 23 Jul 2006 17:31:08 +0000 Subject: -remove old patch for the offset calculation of the inner packet, the original code is fixed now -re-add alignment fixes for variable radiotap elements bump PKGREVISION --- net/wireshark/Makefile | 3 ++- net/wireshark/distinfo | 4 ++-- net/wireshark/patches/patch-aa | 51 +++++++++++++++++++++++++++++++++--------- 3 files changed, 44 insertions(+), 14 deletions(-) diff --git a/net/wireshark/Makefile b/net/wireshark/Makefile index b3b1a88df98..c0dce777c4b 100644 --- a/net/wireshark/Makefile +++ b/net/wireshark/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.1 2006/07/21 14:27:53 tron Exp $ +# $NetBSD: Makefile,v 1.2 2006/07/23 17:31:08 drochner Exp $ DISTNAME= wireshark-0.99.2 +PKGREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.wireshark.org/download/src/ \ ${MASTER_SITE_SOURCEFORGE:=wireshark/} diff --git a/net/wireshark/distinfo b/net/wireshark/distinfo index c58bb3de4cb..1a8d85a802b 100644 --- a/net/wireshark/distinfo +++ b/net/wireshark/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.1 2006/07/21 14:27:53 tron Exp $ +$NetBSD: distinfo,v 1.2 2006/07/23 17:31:08 drochner Exp $ SHA1 (wireshark-0.99.2.tar.bz2) = f3f4f78b5ddbd45f9d805d1a9b50250d323bb57f RMD160 (wireshark-0.99.2.tar.bz2) = 3188b41839a9b1579a2e181cbfd22295ade46649 Size (wireshark-0.99.2.tar.bz2) = 9748955 bytes -SHA1 (patch-aa) = fd28ab2578f2662b024c50369f392f91f03de3df +SHA1 (patch-aa) = 72b8e94efb8be106832e53e01288744cbfef6be7 SHA1 (patch-ab) = 0dc3317d3529d641281ea01592ef0ca39eafc873 diff --git a/net/wireshark/patches/patch-aa b/net/wireshark/patches/patch-aa index b0cab36a020..554bd378890 100644 --- a/net/wireshark/patches/patch-aa +++ b/net/wireshark/patches/patch-aa @@ -1,13 +1,42 @@ -$NetBSD: patch-aa,v 1.1 2006/07/21 14:27:53 tron Exp $ +$NetBSD: patch-aa,v 1.2 2006/07/23 17:31:08 drochner Exp $ ---- epan/dissectors/packet-radiotap.c.orig 2006-07-17 20:59:28.000000000 +0100 -+++ epan/dissectors/packet-radiotap.c 2006-07-21 13:36:03.000000000 +0100 -@@ -610,7 +610,7 @@ - /* dissect the 802.11 header next */ - call_dissector((rflags & IEEE80211_RADIOTAP_F_DATAPAD) ? - ieee80211_datapad_handle : ieee80211_handle, -- tvb_new_subset(tvb, length, -1, -1), pinfo, tree); -+ tvb_new_subset(tvb, offset + length, -1, -1), pinfo, tree); - } +--- epan/dissectors/packet-radiotap.c.orig 2006-07-17 21:59:28.000000000 +0200 ++++ epan/dissectors/packet-radiotap.c +@@ -388,6 +388,11 @@ dissect_radiotap(tvbuff_t *tvb, packet_i + guint8 db, rflags; + guint32 present, next_present; + int bit; ++ gint8 align; ++#define RTALIGN(size) \ ++ align = ((offset + ((size) - 1)) & ~((size) - 1)) - offset; \ ++ offset += align; \ ++ length_remaining -= align - void + if(check_col(pinfo->cinfo, COL_PROTOCOL)) + col_set_str(pinfo->cinfo, COL_PROTOCOL, "WLAN"); +@@ -559,6 +564,7 @@ dissect_radiotap(tvbuff_t *tvb, packet_i + length_remaining--; + break; + case IEEE80211_RADIOTAP_CHANNEL: ++ RTALIGN(2); + if (length_remaining < 4) + break; + if (tree) { +@@ -577,6 +583,7 @@ dissect_radiotap(tvbuff_t *tvb, packet_i + case IEEE80211_RADIOTAP_LOCK_QUALITY: + case IEEE80211_RADIOTAP_TX_ATTENUATION: + case IEEE80211_RADIOTAP_DB_TX_ATTENUATION: ++ RTALIGN(2); + if (length_remaining < 2) + break; + #if 0 +@@ -586,6 +593,9 @@ dissect_radiotap(tvbuff_t *tvb, packet_i + length_remaining-=2; + break; + case IEEE80211_RADIOTAP_TSFT: ++#if 0 /* can't happen because always first */ ++ RTALIGN(8); ++#endif + if (length_remaining < 8) + break; + if (tree) { -- cgit v1.2.3