diff options
author | Michael Brown <mcb30@ipxe.org> | 2013-12-05 01:21:10 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2013-12-05 01:21:10 +0000 |
commit | 2649e8ef70a95acd3a1cba8ba05cc83268b68a05 (patch) | |
tree | 38ddb3ee30c22d9993bc23d97d9fbefb668c9cc8 /src/include/ipxe/in.h | |
parent | 6248894f52b5794970292ea40f68fe0c892eafec (diff) | |
download | ipxe-2649e8ef70a95acd3a1cba8ba05cc83268b68a05.tar.gz |
[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 0f19bbd7c..36032470c 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 ); |