Commit 20c9c825 authored by Sridhar Samudrala's avatar Sridhar Samudrala Committed by David S. Miller

[SCTP] Fix SCTP socket options to work with 32-bit apps on 64-bit kernels.

Adds alignment attribute to a few structures used with SCTP socket
options so that the sizes and offsets remain the same when built using
either 32 or 64 bit tools.
Signed-off-by: default avatarSridhar Samudrala <sri@us.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5fe467ee
...@@ -243,7 +243,7 @@ struct sctp_paddr_change { ...@@ -243,7 +243,7 @@ struct sctp_paddr_change {
int spc_state; int spc_state;
int spc_error; int spc_error;
sctp_assoc_t spc_assoc_id; sctp_assoc_t spc_assoc_id;
}; } __attribute__((packed, aligned(4)));
/* /*
* spc_state: 32 bits (signed integer) * spc_state: 32 bits (signed integer)
...@@ -468,7 +468,7 @@ struct sctp_assocparams { ...@@ -468,7 +468,7 @@ struct sctp_assocparams {
struct sctp_setpeerprim { struct sctp_setpeerprim {
sctp_assoc_t sspp_assoc_id; sctp_assoc_t sspp_assoc_id;
struct sockaddr_storage sspp_addr; struct sockaddr_storage sspp_addr;
}; } __attribute__((packed, aligned(4)));
/* /*
* 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR) * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR)
...@@ -481,7 +481,7 @@ struct sctp_setpeerprim { ...@@ -481,7 +481,7 @@ struct sctp_setpeerprim {
struct sctp_prim { struct sctp_prim {
sctp_assoc_t ssp_assoc_id; sctp_assoc_t ssp_assoc_id;
struct sockaddr_storage ssp_addr; struct sockaddr_storage ssp_addr;
}; } __attribute__((packed, aligned(4)));
/* /*
* 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER) * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER)
...@@ -508,7 +508,7 @@ struct sctp_paddrparams { ...@@ -508,7 +508,7 @@ struct sctp_paddrparams {
struct sockaddr_storage spp_address; struct sockaddr_storage spp_address;
__u32 spp_hbinterval; __u32 spp_hbinterval;
__u16 spp_pathmaxrxt; __u16 spp_pathmaxrxt;
}; } __attribute__((packed, aligned(4)));
/* /*
* 7.2.2 Peer Address Information * 7.2.2 Peer Address Information
...@@ -527,7 +527,7 @@ struct sctp_paddrinfo { ...@@ -527,7 +527,7 @@ struct sctp_paddrinfo {
__u32 spinfo_srtt; __u32 spinfo_srtt;
__u32 spinfo_rto; __u32 spinfo_rto;
__u32 spinfo_mtu; __u32 spinfo_mtu;
}; } __attribute__((packed, aligned(4)));
/* Peer addresses's state. */ /* Peer addresses's state. */
enum sctp_spinfo_state { enum sctp_spinfo_state {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment