esp_netif_init() returns standard esp_err_t error code (unlike tcpip_adapter init), so shall be checked for the return value
Also to make the initialization code more consistent.
inet_aton returns 0 on failure, but socket_add_ipv4_multicast_group has to return negative values for failures
getaddrinfo sets res to zero of address could not resolved, but doesn't necessarily return an
error. res is now checked for zero before dereferencing
Merges https://github.com/espressif/esp-idf/pull/2814