summaryrefslogtreecommitdiff
path: root/print-dhcp6.c
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2016-10-09 11:42:48 +0100
committerDenis Ovsienko <denis@ovsienko.info>2016-10-09 11:44:19 +0100
commit21c80eab7515ba2c476a72ebc1587716e24b64eb (patch)
tree8e3c2d55b018f5a8b2a712f92488d62303df7ff9 /print-dhcp6.c
parente32482c54f1e6d0abab8a25ef31d2c0c282c6df3 (diff)
downloadtcpdump-21c80eab7515ba2c476a72ebc1587716e24b64eb.tar.gz
fix alignment issues with GCC on Solaris 10 SPARC
When compiled with the Solaris Studio 12.3 compiler (as in the OpenCSW buildbot system at the time), tcpdump passed all the tests. When compiled with GCC 5.2.0 on the same host, the following tests failed because tcpdump terminated with SIGILL (Bus Error - core dumped): icmpv6, icmpv6_opt24-v, dhcpv6-aftr-name, dhcpv6-ia-na, dhcpv6-ia-pd, dhcpv6-ia-ta, dhcpv6-ntp-server, dhcpv6-sip-server-d, dhcpv6-domain-list, kday1. This change fixes the issue with the method suggested in commit 1376682.
Diffstat (limited to 'print-dhcp6.c')
-rw-r--r--print-dhcp6.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/print-dhcp6.c b/print-dhcp6.c
index aed1f1b9..05ca6c4f 100644
--- a/print-dhcp6.c
+++ b/print-dhcp6.c
@@ -105,8 +105,8 @@ static const struct tok dh6_msgtype_str[] = {
/* DHCP6 base packet format */
struct dhcp6 {
union {
- uint8_t m;
- uint32_t x;
+ nd_uint8_t m;
+ nd_uint32_t x;
} dh6_msgtypexid;
/* options follow */
};
@@ -116,10 +116,10 @@ struct dhcp6 {
/* DHCPv6 relay messages */
struct dhcp6_relay {
- uint8_t dh6relay_msgtype;
- uint8_t dh6relay_hcnt;
- uint8_t dh6relay_linkaddr[16]; /* XXX: badly aligned */
- uint8_t dh6relay_peeraddr[16];
+ nd_uint8_t dh6relay_msgtype;
+ nd_uint8_t dh6relay_hcnt;
+ nd_uint8_t dh6relay_linkaddr[16]; /* XXX: badly aligned */
+ nd_uint8_t dh6relay_peeraddr[16];
/* options follow */
};
@@ -263,8 +263,8 @@ static const struct tok dh6opt_stcode_str[] = {
};
struct dhcp6opt {
- uint16_t dh6opt_type;
- uint16_t dh6opt_len;
+ nd_uint16_t dh6opt_type;
+ nd_uint16_t dh6opt_len;
/* type-dependent data follows */
};