summaryrefslogtreecommitdiff
path: root/wiretap/libpcap.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2012-07-19 01:00:49 +0000
committerMichael Mann <mmann78@netscape.net>2012-07-19 01:00:49 +0000
commit7184dac548a97c3ebc0ff41a617cbcfe3e58306b (patch)
tree7779bf726f712bf5e941a42c8c25e6b07e12ec39 /wiretap/libpcap.c
parent757361f4d4befb4d8eb64d39a55ec740db7f6ee9 (diff)
downloadwireshark-7184dac548a97c3ebc0ff41a617cbcfe3e58306b.tar.gz
Addresses https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3895. Note that this doesn't write a Nokia file type properly, it just doesn't corrupt an existing one (read in by Wireshark) if resaved.
svn path=/trunk/; revision=43815
Diffstat (limited to 'wiretap/libpcap.c')
-rw-r--r--wiretap/libpcap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wiretap/libpcap.c b/wiretap/libpcap.c
index f659db6a50..08cf091ce2 100644
--- a/wiretap/libpcap.c
+++ b/wiretap/libpcap.c
@@ -1014,7 +1014,9 @@ static gboolean libpcap_dump(wtap_dumper *wdh,
break;
case WTAP_FILE_PCAP_NOKIA: /* old magic, extra crap at the end */
- rec_hdr.ifindex = 0;
+ /* restore the "mysterious stuff" that came with the packet */
+ memcpy(&rec_hdr.ifindex, pseudo_header->nokia.stuff, 4);
+ /* not written */
rec_hdr.protocol = 0;
rec_hdr.pkt_type = 0;
rec_hdr.cpu1 = 0;