diff options
author | 2012-02-21 04:22:30 +0000 | |
---|---|---|
committer | 2012-02-21 04:22:30 +0000 | |
commit | c9c739db122cd444d6877939fc3c570b4d7589b7 (patch) | |
tree | dfbc214ad6c25c51a4e8af83d8dc6bfff73966af /net-wireless/kismet/files/header_alignment_r3326.patch | |
parent | Restricting pypy (diff) | |
download | historical-c9c739db122cd444d6877939fc3c570b4d7589b7.tar.gz historical-c9c739db122cd444d6877939fc3c570b4d7589b7.tar.bz2 historical-c9c739db122cd444d6877939fc3c570b4d7589b7.zip |
Remove kismest 2011.03.2 ebuild. Revbump to add a critical patch from svn. Fix the bluez dependency issue.
Package-Manager: portage-2.1.10.48/cvs/Linux x86_64
Diffstat (limited to 'net-wireless/kismet/files/header_alignment_r3326.patch')
-rw-r--r-- | net-wireless/kismet/files/header_alignment_r3326.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/net-wireless/kismet/files/header_alignment_r3326.patch b/net-wireless/kismet/files/header_alignment_r3326.patch new file mode 100644 index 000000000000..408456ecafec --- /dev/null +++ b/net-wireless/kismet/files/header_alignment_r3326.patch @@ -0,0 +1,58 @@ +diff -Naur kismet-2011-03-R2-orig/packetsource_pcap.cc kismet-2011-03-R2/packetsource_pcap.cc +--- kismet-2011-03-R2-orig/packetsource_pcap.cc 2011-01-05 16:52:51.000000000 -0500 ++++ kismet-2011-03-R2/packetsource_pcap.cc 2012-02-20 22:37:17.973526919 -0500 +@@ -553,6 +553,9 @@ + } + #endif + ++#define ALIGN_OFFSET(offset, width) \ ++ ( (((offset) + ((width) - 1)) & (~((width) - 1))) - offset ) ++ + /* + * Useful combinations of channel characteristics. + */ +@@ -617,6 +620,8 @@ + enum ieee80211_radiotap_type bit; + int bit0; + const u_char *iter; ++ const u_char *iter_start; ++ unsigned int iter_align; + int fcs_cut = 0; // Is the FCS bit set? + char errstr[STATUS_MAX]; + +@@ -658,7 +663,7 @@ + + eight11chunk->dlt = KDLT_IEEE802_11; + +- iter = (u_char*)(last_presentp + 1); ++ iter_start = iter = (u_char*)(last_presentp + 1); + + for (bit0 = 0, presentp = &hdr->it_present; presentp <= last_presentp; + presentp++, bit0 += 32) { +@@ -686,6 +691,9 @@ + u.i8 = *iter++; + break; + case IEEE80211_RADIOTAP_CHANNEL: ++ iter_align = ALIGN_OFFSET((unsigned int) (iter - iter_start), 2); ++ iter += iter_align; ++ + u.u16 = EXTRACT_LE_16BITS(iter); + iter += sizeof(u.u16); + u2.u16 = EXTRACT_LE_16BITS(iter); +@@ -695,10 +703,16 @@ + case IEEE80211_RADIOTAP_LOCK_QUALITY: + case IEEE80211_RADIOTAP_TX_ATTENUATION: + case IEEE80211_RADIOTAP_DB_TX_ATTENUATION: ++ iter_align = ALIGN_OFFSET((unsigned int) (iter - iter_start), 2); ++ iter += iter_align; ++ + u.u16 = EXTRACT_LE_16BITS(iter); + iter += sizeof(u.u16); + break; + case IEEE80211_RADIOTAP_TSFT: ++ iter_align = ALIGN_OFFSET((unsigned int) (iter - iter_start), 8); ++ iter += iter_align; ++ + u.u64 = EXTRACT_LE_64BITS(iter); + iter += sizeof(u.u64); + break; |