Wireshark-bugs: [Wireshark-bugs] [Bug 6424] New: Incorrect IP address with text2pcap -i option o
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6424
Summary: Incorrect IP address with text2pcap -i option on big
endian machines
Product: Wireshark
Version: 1.6.2
Platform: SPARC
OS/Version: All
Status: NEW
Severity: Normal
Priority: Low
Component: Extras
AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
ReportedBy: psfales@xxxxxxxxxxxxxxxxxx
Created an attachment (id=7136)
--> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=7136)
patch for text2pcap on big-endian machines
Build Information:
wireshark 1.6.2
Copyright 1998-2011 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled (32-bit) with GTK+ 2.12.8, with GLib 2.19.10, with libpcap 1.1.1, with
libz 1.2.3, without POSIX capabilities, without libpcre, without SMI, without
c-ares, with ADNS, without Lua, without Python, without GnuTLS, with Gcrypt
1.2.2, without Kerberos, without GeoIP, without PortAudio, without AirPcap.
Running on SunOS 5.8, with libpcap version 1.1.1, with libz 1.2.3, Gcrypt
1.2.2.
Built using gcc 3.4.6.
--
When the text2pcap -i option is used to create a capture file, and that capture
file is read back with wireshark, it behaves differently on a big-endian
machine such as sparc than it does on a little endian machine like x86. On the
little-endian machine the IP addresses are 10.1.1.1 an 10.2.2.2, but on the
big-endian machine they are 1.1.1.10 and 2.2.2.10.
The problem seems to be the hard coded src_addr and dst_addr values for HDR_IP
in text2pcap.c. I'm sure there are various ways to fix this, but I've
attached a patch that seems to work here.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.