diff options
author | Rob Landley <rob@landley.net> | 2015-02-08 16:27:30 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-02-08 16:27:30 -0600 |
commit | 5ff746852503b86717deb7d978d9069ba7288a7c (patch) | |
tree | cc67d5582f7be4918112988bf38ac6482ecab5a7 /toys | |
parent | 8c4fdd827349de82b1ac2d277564ca4dfdfc7caf (diff) | |
download | toybox-5ff746852503b86717deb7d978d9069ba7288a7c.tar.gz |
For some reason, ifconfig was explicitly excluding "ifconfig lo:0 127.0.0.2" style alias address assignments. No idea why.
Diffstat (limited to 'toys')
-rw-r--r-- | toys/other/ifconfig.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/other/ifconfig.c b/toys/other/ifconfig.c index 4d5c74d0..8db3ff06 100644 --- a/toys/other/ifconfig.c +++ b/toys/other/ifconfig.c @@ -462,7 +462,7 @@ void ifconfig_main(void) close(fd6); continue; // Iterate through table to find/perform operation - } else for (i = 0; i < sizeof(try)/sizeof(*try); i++) { + } else for (i = 0; i < ARRAY_LEN(try); i++) { struct argh *t = try+i; int on = t->on, off = t->off; @@ -485,7 +485,7 @@ void ifconfig_main(void) poke((on>>16) + (char *)&ifre, l, on&15); xioctl(TT.sockfd, off, &ifre); break; - } else if (t->name || !strchr(ifre.ifr_name, ':')) { + } else { struct sockaddr_in *si = (struct sockaddr_in *)&ifre.ifr_addr; int mask = -1; |