Hi,

the ifconfig program from inetutils-1.9.4 seems to ignore the flags
after the given address:
ifconfig lo 127.0.0.1 up
sets the address but does not active lo.
Splitting the command in two commands:
ifconfig lo 127.0.0.1
ifconfig lo up
works as expected.

A dirty patch:
--- ifconfig/options.c.bak      2015-06-09 09:43:04.000000000 +0200
+++ ifconfig/options.c  2015-07-06 14:04:17.881621957 +0200
@@ -482,13 +482,14 @@
 void
 parse_opt_finalize (struct ifconfig *ifp)
 {
-  if (ifp && !ifp->valid)
-    {
-      ifp->valid = IF_VALID_FORMAT;
-      ifp->format = default_format;
-      ifp->setflags |= pending_setflags;
-      ifp->clrflags |= pending_clrflags;
-    }
+       if(ifp) {
+               if(!ifp->valid) {
+                       ifp->valid = IF_VALID_FORMAT;
+                       ifp->format = default_format;
+               }
+               ifp->setflags |= pending_setflags;
+               ifp->clrflags |= pending_clrflags;
+       }
 }

 static error_t

works for me. But there is one problem left. The
documentation states that one can omit the "up" after the
address as that's the default. But it's not.

Regards,
Peter

Reply via email to