[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-inetutils] ifconfig
From: |
Hans-Peter Budek |
Subject: |
[bug-inetutils] ifconfig |
Date: |
Mon, 06 Jul 2015 15:55:24 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 |
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
- [bug-inetutils] ifconfig,
Hans-Peter Budek <=