cURL / Mailing Lists / curl-library / Single Mail

curl-library

[PATCH 02/10] parseurlandfillconn: Print network interface error

From: Till Maas <opensource_at_till.name>
Date: Sat, 15 Mar 2014 19:41:26 +0100

---
 lib/url.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/lib/url.c b/lib/url.c
index ee888d2..cc33bc5 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3978,6 +3978,10 @@ static CURLcode parseurlandfillconn(struct SessionHandle *data,
           /* Remove ']' */
           ifname[square_bracket] = '\0';
           scope = if_nametoindex(ifname);
+          if (scope == 0) {
+              infof(data, "Invalid network interface: %s: %s", ifname,
+                    strerror(errno));
+          }
         }
         if (scope > 0) {
           /* Remove zone identifier from hostname */
-- 
1.8.3.1
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-03-15