Re: cannot set IP for ethernet
From: Herbert Xu
Date: Wed Jun 13 2007 - 23:54:17 EST
On Tue, Jun 12, 2007 at 04:06:25PM +0200, Patrick McHardy wrote:
> Oliver Neukum wrote:
> > with 2.6.22-rc4-git2 I am getting errors when setting IP for ethernet
> > interfaces:
> >
> > ioctl(4, SIOCSIFADDR, 0x7fff94931600) = -1 ENOBUFS (No buffer space available)
> >
> > The error is independant of the interface. It happens to all interfaces.
> > There's nothing in the syslog.
> >
> > valisk:/home/oliver # uname -a
> > Linux valisk 2.6.22-rc4-git2-default #3 SMP Tue Jun 12 13:27:54 CEST 2007 x86_64 x86_64 x86_64 GNU/Linux
>
> This can happen if the initial inetdev allocation when the netdevice is
> registered fails. I think it would make sense to try to allocate again
> when adding addresses in that case, otherwise there is no way of
> recovery other than unregistering and registering the device again.
Actually in his case it's because 2.6.22-rc4-git2 doesn't have the
following changeset.
Let me have a think about your approach too.
Thanks,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
commit 6363097cc4d182f93788131b5d8f72aa91d950a0
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Thu Jun 7 18:35:38 2007 -0700
[IPV4]: Do not remove idev when addresses are cleared
Now that we create idev before addresses are added, it no longer makes
sense to remove them when addresses are all deleted.
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
6363097cc4d182f93788131b5d8f72aa91d950a0
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index fa97b96..abf6352 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -327,12 +327,8 @@ static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
}
}
- if (destroy) {
+ if (destroy)
inet_free_ifa(ifa1);
-
- if (!in_dev->ifa_list)
- inetdev_destroy(in_dev);
- }
}
static void inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/