aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
diff options
context:
space:
mode:
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2011-10-02 13:43:57 +0000
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>2011-10-02 13:43:57 +0000
commitf14eb4ada0b4242918a6e2295de28536157a7498 (patch)
tree966eeac9baf92571bdc8f2d50bfa285f1b31f535 /text2pcap.c
parent3daa9d71fa6b62f36171be323a0e31f0342f3a10 (diff)
From Peter Fales via bug 6424:
Corrected IP address with text2pcap -i option on big endian machines. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39215 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/text2pcap.c b/text2pcap.c
index 7d375dc117..928eda4528 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -275,7 +275,13 @@ typedef struct {
guint32 dest_addr;
} hdr_ip_t;
-static hdr_ip_t HDR_IP = {0x45, 0, 0, 0x3412, 0, 0, 0xff, 0, 0, 0x0101010a, 0x0202020a};
+static hdr_ip_t HDR_IP = {0x45, 0, 0, 0x3412, 0, 0, 0xff, 0, 0,
+#ifdef WORDS_BIGENDIAN
+0x0a010101, 0x0a020202
+#else
+0x0101010a, 0x0202020a
+#endif
+};
static struct { /* pseudo header for checksum calculation */
guint32 src_addr;