net: socket: Use network interface name length for IFNAMSIZ
If the network interface naming is enabled, then use the interface name length (CONFIG_NET_INTERFACE_NAME_LEN) for IFNAMSIZ instead of device name length. Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
parent
a9aed0bb51
commit
0b24aaad2c
1 changed files with 4 additions and 0 deletions
|
@ -995,7 +995,11 @@ static inline char *inet_ntop(sa_family_t family, const void *src, char *dst,
|
||||||
#define EAI_FAMILY DNS_EAI_FAMILY
|
#define EAI_FAMILY DNS_EAI_FAMILY
|
||||||
#endif /* defined(CONFIG_NET_SOCKETS_POSIX_NAMES) */
|
#endif /* defined(CONFIG_NET_SOCKETS_POSIX_NAMES) */
|
||||||
|
|
||||||
|
#if defined(CONFIG_NET_INTERFACE_NAME)
|
||||||
|
#define IFNAMSIZ CONFIG_NET_INTERFACE_NAME_LEN
|
||||||
|
#else
|
||||||
#define IFNAMSIZ Z_DEVICE_MAX_NAME_LEN
|
#define IFNAMSIZ Z_DEVICE_MAX_NAME_LEN
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Interface description structure */
|
/** Interface description structure */
|
||||||
struct ifreq {
|
struct ifreq {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue