aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2011-10-02 13:43:57 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2011-10-02 13:43:57 +0000
commitd7f7889f0c1713ab0c1a4956aa331eb2e9601e86 (patch)
tree966eeac9baf92571bdc8f2d50bfa285f1b31f535 /text2pcap.c
parent3e75b436a0088ba55225bc65e39ce2bda2bcfa78 (diff)
From Peter Fales via bug 6424:
Corrected IP address with text2pcap -i option on big endian machines. svn path=/trunk/; revision=39215
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;