diff options
author | Michael Brown | 2013-12-05 02:21:10 +0100 |
---|---|---|
committer | Michael Brown | 2013-12-05 02:21:10 +0100 |
commit | 2649e8ef70a95acd3a1cba8ba05cc83268b68a05 (patch) | |
tree | 38ddb3ee30c22d9993bc23d97d9fbefb668c9cc8 /src/include/ipxe/in.h | |
parent | [dns] Add support for resolving IPv6 addresses via AAAA records (diff) | |
download | ipxe-2649e8ef70a95acd3a1cba8ba05cc83268b68a05.tar.gz ipxe-2649e8ef70a95acd3a1cba8ba05cc83268b68a05.tar.xz ipxe-2649e8ef70a95acd3a1cba8ba05cc83268b68a05.zip |
[socket] Ensure socket address structure sizes are fixed
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/in.h')
-rw-r--r-- | src/include/ipxe/in.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/ipxe/in.h b/src/include/ipxe/in.h index 0f19bbd7..36032470 100644 --- a/src/include/ipxe/in.h +++ b/src/include/ipxe/in.h @@ -88,7 +88,7 @@ struct sockaddr_in { sizeof ( uint16_t ) /* sin_flags */ + sizeof ( uint16_t ) /* sin_port */ + sizeof ( struct in_addr ) /* sin_addr */ ) ]; -} __attribute__ (( may_alias )); +} __attribute__ (( packed, may_alias )); /** * IPv6 socket address @@ -122,7 +122,7 @@ struct sockaddr_in6 { sizeof ( uint16_t ) /* sin6_port */ + sizeof ( uint16_t ) /* sin6_scope_id */ + sizeof ( struct in6_addr ) /* sin6_addr */ ) ]; -} __attribute__ (( may_alias )); +} __attribute__ (( packed, may_alias )); extern int inet_aton ( const char *cp, struct in_addr *inp ); extern char * inet_ntoa ( struct in_addr in ); |