--- a/toys/pending/ifconfig.c	2013-11-21 02:31:03.000000000 +0530
+++ b/toys/pending/ifconfig.c	2013-11-22 15:38:00.345615358 +0530
@@ -212,7 +212,7 @@
     xputc('\n');
   }
 
-  fp = fopen("/proc/net/if_net6", "r");
+  fp = fopen("/proc/net/if_inet6", "r");
   if (fp) {
     char iface_name[IFNAMSIZ] = {0,};
     int plen, iscope;
@@ -325,7 +325,7 @@
   fp = xfopen("/proc/net/dev", "r");
 
   for (i=0; fgets(toybuf, sizeof(toybuf), fp); i++) {
-    char *buf = toybuf;
+    char *buf = toybuf, *dupname;
     unsigned long long val[17];
 
     if (i<2) continue;
@@ -333,25 +333,27 @@
     while (isspace(*buf)) buf++;
     name = strsep(&buf, ":");
     if(!buf) error_exit("bad name %s", name);
+    dupname = xstrdup(name);
 
     errno = 0;
     for (j=0; j<16 && !errno; j++) val[j] = strtoll(buf, &buf, 0);
-    if (errno) perror_exit("bad %s at %s", name, buf);
+    if (errno) perror_exit("bad %s at %s", dupname, buf);
 
     if (iface_name) {
-      if (!strcmp(iface_name, name)) {
-        display_ifconfig(name, 1, val);
+      if (!strcmp(iface_name, dupname)) {
+        display_ifconfig(dupname, 1, val);
 
         return;
       }
     } else {
-      sl = xmalloc(sizeof(*sl)+strlen(name)+1);
-      strcpy(sl->str, name);
+      sl = xmalloc(sizeof(*sl)+strlen(dupname)+1);
+      strcpy(sl->str, dupname);
       sl->next = ifaces;
       ifaces = sl;
 
-      display_ifconfig(name, toys.optflags & FLAG_a, val);
+      display_ifconfig(dupname, toys.optflags & FLAG_a, val);
     }
+    free(dupname);
   }
   fclose(fp);
 
@@ -450,7 +452,11 @@
       // Is this an SIOCSI entry?
       if ((off|0xff) == 0x89ff) {
         if (!rev) {
-          if (!*++argv) show_help();
+          if (!*++argv) {
+            toys.exitval++;
+            show_help();
+            return;
+          }
 
           // Assign value to ifre field and call ioctl? (via IFREQ_OFFSZ.)
           if (on < 0) {
