Commit fe662dfd authored by Martin Mareš's avatar Martin Mareš
Browse files

Fixed `too many interfaces' cases.

parent 0498d92f
......@@ -147,7 +147,7 @@ krt_if_scan(struct kif_proto *p)
res = ioctl(if_scan_sock, SIOCGIFCONF, &ic);
if (res < 0 && errno != EFAULT)
die("SIOCCGIFCONF: %m");
if (res < last_ifbuf_size)
if (res >= 0 && ic.ifc_len < last_ifbuf_size)
{
scan_ifs(r, ic.ifc_len);
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment