net: ip: sockaddr_ll_ptr is larger than sockaddr_in6_ptr
Make sure that the largest sockaddr_xx_ptr length is defined last. Otherwise we might copy wrong amount of data. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
1a01aacd16
commit
e6672f848a
|
@ -310,10 +310,12 @@ struct cmsghdr {
|
|||
|
||||
#if defined(CONFIG_NET_IPV6)
|
||||
#undef NET_SOCKADDR_MAX_SIZE
|
||||
#undef NET_SOCKADDR_PTR_MAX_SIZE
|
||||
#define NET_SOCKADDR_MAX_SIZE (sizeof(struct sockaddr_in6))
|
||||
#if !defined(CONFIG_NET_SOCKETS_PACKET)
|
||||
#undef NET_SOCKADDR_PTR_MAX_SIZE
|
||||
#define NET_SOCKADDR_PTR_MAX_SIZE (sizeof(struct sockaddr_in6_ptr))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_NET_IPV4)
|
||||
#if !defined(CONFIG_NET_IPV6)
|
||||
|
|
Loading…
Reference in New Issue