From a5003e831173b76c02f4bad9d9851983501b7f73 Mon Sep 17 00:00:00 2001 From: Francois Berder <francois.berder@imgtec.com> Date: Fri, 3 Mar 2017 16:49:54 +0000 Subject: [PATCH] posix: in: Fix sockaddr_in6 structure The sin6_family member was an int. This caused the structure to take 32 bytes which was greater than sockaddr_storage size (28 bytes). Using the type sa_family_t for sin6_family member fixes this issue. Signed-off-by: Francois Berder <francois.berder@imgtec.com> --- sys/posix/include/netinet/in.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/posix/include/netinet/in.h b/sys/posix/include/netinet/in.h index b6597c95c5..bba7b7f018 100644 --- a/sys/posix/include/netinet/in.h +++ b/sys/posix/include/netinet/in.h @@ -239,7 +239,7 @@ struct sockaddr_in6 { /** * Protocol family, always AF_INET6. Member of struct sockaddr_in6 */ - int sin6_family; /**< Protocol family, always AF_INET6 */ + sa_family_t sin6_family; /**< Protocol family, always AF_INET6 */ in_port_t sin6_port; /**< Port number */ uint32_t sin6_flowinfo; /**< IPv6 traffic class and flow information */ struct in6_addr sin6_addr; /**< IPv6 address */ -- GitLab