netlib_ipv[4|6]adaptor: Add a check to handle the case where the network device configuration changed asynchronously and the second IOCTL returns more data than the allocated buffer.

This commit is contained in:
Gregory Nutt 2017-09-20 06:52:05 -06:00
parent 2cd27e17a1
commit fb804e3498
3 changed files with 38 additions and 8 deletions

View file

@ -160,11 +160,11 @@ int netlib_get_ipv6addr(FAR const char *ifname, FAR struct in6_addr *addr);
int netlib_set_ipv6addr(FAR const char *ifname, FAR const struct in6_addr *addr);
int netlib_set_dripv6addr(FAR const char *ifname, FAR const struct in6_addr *addr);
int netlib_set_ipv6netmask(FAR const char *ifname, FAR const struct in6_addr *addr);
int netlib_ipv6adaptor(FAR const struct in6_addr *destipaddr,
FAR struct in6_addr *srcipaddr);
uint8_t netlib_ipv6netmask2prefix(FAR const uint16_t *mask);
void netlib_prefix2ipv6netmask(uint8_t preflen, FAR struct in6_addr *netmask);
int netlib_ipv6adaptor(FAR const struct in6_addr *destipaddr,
FAR struct in6_addr *srcipaddr);
#endif
#ifdef CONFIG_NETDEV_WIRELESS_IOCTL