From 5ff746852503b86717deb7d978d9069ba7288a7c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 8 Feb 2015 16:27:30 -0600 Subject: For some reason, ifconfig was explicitly excluding "ifconfig lo:0 127.0.0.2" style alias address assignments. No idea why. --- toys/other/ifconfig.c | 4 ++-- 1 file 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; -- cgit v1.2.3