* [PATCH] fix ifenslave to not fail on lack of IP information
@ 2005-11-04 16:54 Neil Horman
2005-11-07 6:23 ` Willy Tarreau
0 siblings, 1 reply; 3+ messages in thread
From: Neil Horman @ 2005-11-04 16:54 UTC (permalink / raw)
To: linux-kernel; +Cc: bonding-devel, nhorman, ctindel, fubar, akpm
[-- Attachment #1: Type: text/plain, Size: 1812 bytes --]
The current version of ifenslave fails to attach slave interfaces to a bond if
the masters doesn't have appropriate IP information. While its common for
bonded interface to have IP information its not required (bond as part of a
bridge for instance). This patch modifies ifenslave to not fail if IP
information is not available in the master at the time of enslaving.
Regards
Neil
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
ifenslave.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c
--- a/Documentation/networking/ifenslave.c
+++ b/Documentation/networking/ifenslave.c
@@ -517,11 +517,10 @@ static int if_getconfig(char *ifname)
ifname, ifr.ifr_flags);
strcpy(ifr.ifr_name, ifname);
- if (ioctl(skfd, SIOCGIFADDR, &ifr) < 0)
- return -1;
- printf("The result of SIOCGIFADDR is %2.2x.%2.2x.%2.2x.%2.2x.\n",
- ifr.ifr_addr.sa_data[0], ifr.ifr_addr.sa_data[1],
- ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]);
+ if (ioctl(skfd, SIOCGIFADDR, &ifr) >= 0)
+ printf("The result of SIOCGIFADDR is %2.2x.%2.2x.%2.2x.%2.2x.\n",
+ ifr.ifr_addr.sa_data[0], ifr.ifr_addr.sa_data[1],
+ ifr.ifr_addr.sa_data[2], ifr.ifr_addr.sa_data[3]);
strcpy(ifr.ifr_name, ifname);
if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0)
@@ -1085,7 +1084,6 @@ static int set_if_addr(char *master_ifna
slave_ifname, ifra[i].req_name,
strerror(saved_errno));
- return res;
}
ipaddr = ifr.ifr_addr.sa_data;
--
/***************************************************
*Neil Horman
*Software Engineer
*gpg keyid: 1024D / 0x92A74FA1 - http://pgp.mit.edu
***************************************************/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix ifenslave to not fail on lack of IP information
2005-11-04 16:54 [PATCH] fix ifenslave to not fail on lack of IP information Neil Horman
@ 2005-11-07 6:23 ` Willy Tarreau
2005-11-11 4:20 ` Rob Landley
0 siblings, 1 reply; 3+ messages in thread
From: Willy Tarreau @ 2005-11-07 6:23 UTC (permalink / raw)
To: Neil Horman; +Cc: linux-kernel, bonding-devel, ctindel, fubar, akpm
Hi,
On Fri, Nov 04, 2005 at 11:54:34AM -0500, Neil Horman wrote:
> The current version of ifenslave fails to attach slave interfaces to a bond if
> the masters doesn't have appropriate IP information. While its common for
> bonded interface to have IP information its not required (bond as part of a
> bridge for instance). This patch modifies ifenslave to not fail if IP
> information is not available in the master at the time of enslaving.
>
> Regards
> Neil
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>
>
> ifenslave.c | 10 ++++------
> 1 files changed, 4 insertions(+), 6 deletions(-)
>
>
> diff --git a/Documentation/networking/ifenslave.c b/Documentation/networking/ifenslave.c
> --- a/Documentation/networking/ifenslave.c
> +++ b/Documentation/networking/ifenslave.c
(...)
I find it annoying that ifenslave is still hosted by the kernel. I made
this mistake years ago because it was not hosted anywhere and I needed
to make changes available somewhere, but it should move to somewhere
else, either as a standalone package on sf.net, or added to an existing
package such as ifconfig, or better merged with it. I even think that
if ifconfig included all ifenslave, vconfig, ethtool and brctl functions,
it wouldn't be abandonned as it is now, but this is another problem.
Regards,
Willy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix ifenslave to not fail on lack of IP information
2005-11-07 6:23 ` Willy Tarreau
@ 2005-11-11 4:20 ` Rob Landley
0 siblings, 0 replies; 3+ messages in thread
From: Rob Landley @ 2005-11-11 4:20 UTC (permalink / raw)
To: Willy Tarreau
Cc: Neil Horman, linux-kernel, bonding-devel, ctindel, fubar, akpm
On Monday 07 November 2005 00:23, Willy Tarreau wrote:
> I find it annoying that ifenslave is still hosted by the kernel. I made
> this mistake years ago because it was not hosted anywhere and I needed
> to make changes available somewhere, but it should move to somewhere
> else, either as a standalone package on sf.net, or added to an existing
> package such as ifconfig, or better merged with it. I even think that
> if ifconfig included all ifenslave, vconfig, ethtool and brctl functions,
> it wouldn't be abandonned as it is now, but this is another problem.
We're adding it to busybox in the not-to-distant future. (Possibly even Next
Sunday, A.D.)
> Regards,
> Willy
Rob
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-11 4:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-04 16:54 [PATCH] fix ifenslave to not fail on lack of IP information Neil Horman
2005-11-07 6:23 ` Willy Tarreau
2005-11-11 4:20 ` Rob Landley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome