aboutsummaryrefslogtreecommitdiff
path: root/lib/getinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/getinfo.c')
-rw-r--r--lib/getinfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/getinfo.c b/lib/getinfo.c
index 078154246..bef2ebac4 100644
--- a/lib/getinfo.c
+++ b/lib/getinfo.c
@@ -210,6 +210,10 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
option had been enabled! */
*param_charp = data->info.wouldredirect;
break;
+ case CURLINFO_PRIMARY_IP:
+ /* Return the ip address of the most recent (primary) connection */
+ *param_charp = data->info.ip;
+ break;
default:
return CURLE_BAD_FUNCTION_ARGUMENT;
}