X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fsocket-util.c;h=b0ff7cfc1bf31ad6bd5c0e39806f3cd403371e9a;hb=1bbd17282444f67e6509ecc930326ec4314da93f;hp=c1c41ec3073ca71ce8d0ca002750b7f326432113;hpb=4f57ad100f4556c45a7ad4c4fe904545a99976e5;p=sliver-openvswitch.git diff --git a/lib/socket-util.c b/lib/socket-util.c index c1c41ec30..b0ff7cfc1 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -128,7 +128,7 @@ set_dscp(int fd, uint8_t dscp) int lookup_ip(const char *host_name, struct in_addr *addr) { - if (!inet_aton(host_name, addr)) { + if (!inet_pton(AF_INET, host_name, addr)) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); VLOG_ERR_RL(&rl, "\"%s\" is not a valid IP address", host_name); return ENOENT; @@ -165,7 +165,7 @@ lookup_hostname(const char *host_name, struct in_addr *addr) struct addrinfo *result; struct addrinfo hints; - if (inet_aton(host_name, addr)) { + if (inet_pton(AF_INET, host_name, addr)) { return 0; }