diff --git a/lib/prefix.c b/lib/prefix.c index 21c3af7d49..858f860ee8 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -853,7 +853,7 @@ int str2prefix_ipv4(const char *str, struct prefix_ipv4 *p) /* String doesn't contail slash. */ if (pnt == NULL) { /* Convert string to prefix. */ - ret = inet_aton(str, &p->prefix); + ret = inet_pton(AF_INET, str, &p->prefix); if (ret == 0) return 0;