public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* cannot set IP for ethernet
@ 2007-06-12 12:41 Oliver Neukum
  2007-06-12 13:31 ` Jan Engelhardt
  2007-06-12 14:06 ` Patrick McHardy
  0 siblings, 2 replies; 14+ messages in thread
From: Oliver Neukum @ 2007-06-12 12:41 UTC (permalink / raw)
  To: linux-kernel

Hi,

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

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-12 12:41 cannot set IP for ethernet Oliver Neukum
@ 2007-06-12 13:31 ` Jan Engelhardt
  2007-06-12 14:13   ` Oliver Neukum
  2007-06-12 14:06 ` Patrick McHardy
  1 sibling, 1 reply; 14+ messages in thread
From: Jan Engelhardt @ 2007-06-12 13:31 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel


On Jun 12 2007 14:41, 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)

And if you do it over netlink, as is common today?


	Jan
-- 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-12 12:41 cannot set IP for ethernet Oliver Neukum
  2007-06-12 13:31 ` Jan Engelhardt
@ 2007-06-12 14:06 ` Patrick McHardy
  2007-06-13  8:39   ` Oliver Neukum
  2007-06-14  3:53   ` Herbert Xu
  1 sibling, 2 replies; 14+ messages in thread
From: Patrick McHardy @ 2007-06-12 14:06 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel, Linux Netdev List, Herbert Xu

[-- Attachment #1: Type: text/plain, Size: 726 bytes --]

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.


[-- Attachment #2: x --]
[-- Type: text/plain, Size: 776 bytes --]

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index abf6352..dc77e91 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -401,8 +401,11 @@ static int inet_set_ifa(struct net_device *dev, struct in_ifaddr *ifa)
 	ASSERT_RTNL();
 
 	if (!in_dev) {
-		inet_free_ifa(ifa);
-		return -ENOBUFS;
+		in_dev = inetdev_init(dev);
+		if (!in_dev) {
+			inet_free_ifa(ifa);
+			return -ENOBUFS;
+		}
 	}
 	ipv4_devconf_setall(in_dev);
 	if (ifa->ifa_dev != in_dev) {
@@ -514,8 +517,11 @@ static struct in_ifaddr *rtm_to_ifaddr(struct nlmsghdr *nlh)
 
 	in_dev = __in_dev_get_rtnl(dev);
 	if (in_dev == NULL) {
-		err = -ENOBUFS;
-		goto errout;
+		in_dev = inetdev_init(dev);
+		if (!in_dev) {
+			err = -ENOBUFS;
+			goto errout;
+		}
 	}
 
 	ipv4_devconf_setall(in_dev);

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-12 13:31 ` Jan Engelhardt
@ 2007-06-12 14:13   ` Oliver Neukum
  2007-06-12 15:14     ` Jan Engelhardt
  0 siblings, 1 reply; 14+ messages in thread
From: Oliver Neukum @ 2007-06-12 14:13 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel

Am Dienstag, 12. Juni 2007 schrieb Jan Engelhardt:
> 
> On Jun 12 2007 14:41, 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)
> 
> And if you do it over netlink, as is common today?

valisk:/home/oliver # strace ip addr add 192.168.234.17/24 brd + dev eth1
execve("/sbin/ip", ["ip", "addr", "add", "192.168.234.17/24", "brd", "+", "dev", "eth1"], [/* 84 vars */]) = 0
brk(0)                                  = 0x628000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b18e11de000
uname({sys="Linux", node="valisk", ...}) = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=160918, ...}) = 0
mmap(NULL, 160918, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b18e11df000
close(3)                                = 0
open("/lib64/libresolv.so.2", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P5\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=73920, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b18e1207000
mmap(NULL, 2177896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b18e13e0000
fadvise64(3, 0, 2177896, POSIX_FADV_WILLNEED) = 0
mprotect(0x2b18e13f1000, 2093056, PROT_NONE) = 0
mmap(0x2b18e15f0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x2b18e15f0000
mmap(0x2b18e15f2000, 7016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b18e15f2000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY)      = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\332\1\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1358528, ...}) = 0
mmap(NULL, 3404024, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b18e15f4000
fadvise64(3, 0, 3404024, POSIX_FADV_WILLNEED) = 0
mprotect(0x2b18e172b000, 2093056, PROT_NONE) = 0
mmap(0x2b18e192a000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x136000) = 0x2b18e192a000
mmap(0x2b18e192f000, 16632, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2b18e192f000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b18e1934000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b18e1935000
arch_prctl(ARCH_SET_FS, 0x2b18e1934b00) = 0
mprotect(0x2b18e192a000, 12288, PROT_READ) = 0
munmap(0x2b18e11df000, 160918)          = 0
socket(PF_NETLINK, SOCK_RAW, 0)         = 3
setsockopt(3, SOL_SOCKET, SO_SNDBUF, [32768], 4) = 0
setsockopt(3, SOL_SOCKET, SO_RCVBUF, [32768], 4) = 0
bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, pid=12240, groups=00000000}, [16230387979418337292]) = 0
gettimeofday({1181657227, 120512}, NULL) = 0
sendto(3, "\24\0\0\0\22\0\1\3\214\250nF\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\370\0\0\0\20\0\2\0\214\250nF\320/\0\0\0\0\4\3\1\0\0\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 1004
brk(0)                                  = 0x628000
brk(0x649000)                           = 0x649000
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\214\250nF\320/\0\0\0\0\0\0\1\0\0\0I\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 20
sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0\24\0\5\0\215\250nF\0\0\0\0\2\30\0\0\2\0\0\0\10"..., 48}], msg_controllen=0, msg_flags=0}, 0) = 48
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"$\0\0\0\2\0\0\0\215\250nF\320/\0\0\227\377\377\3770\0\0"..., 16384}], msg_controllen=0, msg_flags=0}, 0) = 36
dup(2)                                  = 4
fcntl(4, F_GETFL)                       = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(4, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b18e11df000
lseek(4, 0, SEEK_CUR)                   = -1 ESPIPE (Illegal seek)
write(4, "RTNETLINK answers: No buffer spa"..., 45RTNETLINK answers: No buffer space available
) = 45
close(4)                                = 0
munmap(0x2b18e11df000, 4096)            = 0
exit_group(2)                           = ?
Process 12240 detached

No luck, but it was not repeatable, as "ifconfig" was.

	Regards
		Oliver


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-12 14:13   ` Oliver Neukum
@ 2007-06-12 15:14     ` Jan Engelhardt
  2007-06-12 15:15       ` Patrick McHardy
  2007-06-12 16:41       ` Oliver Neukum
  0 siblings, 2 replies; 14+ messages in thread
From: Jan Engelhardt @ 2007-06-12 15:14 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel


On Jun 12 2007 16:13, Oliver Neukum wrote:
>> On Jun 12 2007 14:41, 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)

Do you run VPN or some sort?


	Jan
-- 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-12 15:14     ` Jan Engelhardt
@ 2007-06-12 15:15       ` Patrick McHardy
  2007-06-12 16:41       ` Oliver Neukum
  1 sibling, 0 replies; 14+ messages in thread
From: Patrick McHardy @ 2007-06-12 15:15 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Oliver Neukum, linux-kernel

Jan Engelhardt wrote:
> On Jun 12 2007 16:13, Oliver Neukum wrote:
> 
>>>On Jun 12 2007 14:41, 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)
> 
> 
> Do you run VPN or some sort?


As far as I can see only inet_device allocation failure can lead
to this error. Please try the patch I sent in case it is reproducable
after reboot.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-12 15:14     ` Jan Engelhardt
  2007-06-12 15:15       ` Patrick McHardy
@ 2007-06-12 16:41       ` Oliver Neukum
  1 sibling, 0 replies; 14+ messages in thread
From: Oliver Neukum @ 2007-06-12 16:41 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: linux-kernel

Am Dienstag, 12. Juni 2007 schrieb Jan Engelhardt:
> 
> On Jun 12 2007 16:13, Oliver Neukum wrote:
> >> On Jun 12 2007 14:41, 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)
> 
> Do you run VPN or some sort?

Yes, racoon, but the connection was down when I tried setting the IP.

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-12 14:06 ` Patrick McHardy
@ 2007-06-13  8:39   ` Oliver Neukum
  2007-06-13 11:14     ` Patrick McHardy
  2007-06-14  3:53   ` Herbert Xu
  1 sibling, 1 reply; 14+ messages in thread
From: Oliver Neukum @ 2007-06-13  8:39 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: linux-kernel, Linux Netdev List, Herbert Xu

Am Dienstag, 12. Juni 2007 schrieb Patrick McHardy:
> 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.

With your patch the problem has gone away. Is there a way to especially
stress the system in that regard?

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-13  8:39   ` Oliver Neukum
@ 2007-06-13 11:14     ` Patrick McHardy
  2007-06-13 11:21       ` Oliver Neukum
  0 siblings, 1 reply; 14+ messages in thread
From: Patrick McHardy @ 2007-06-13 11:14 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel, Linux Netdev List, Herbert Xu

Oliver Neukum wrote:
> Am Dienstag, 12. Juni 2007 schrieb Patrick McHardy:
> 
>>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.
> 
> 
> With your patch the problem has gone away. Is there a way to especially
> stress the system in that regard?


Its a failed allocation at NETDEV_REGISTER time. I guess you could
keep unloading + reloading the driver module to try to reproduce it.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-13 11:14     ` Patrick McHardy
@ 2007-06-13 11:21       ` Oliver Neukum
  2007-06-13 11:25         ` Patrick McHardy
  0 siblings, 1 reply; 14+ messages in thread
From: Oliver Neukum @ 2007-06-13 11:21 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: linux-kernel, Linux Netdev List, Herbert Xu

Am Mittwoch, 13. Juni 2007 schrieb Patrick McHardy:
> Oliver Neukum wrote:
> > Am Dienstag, 12. Juni 2007 schrieb Patrick McHardy:
> > 
> >>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.
> > 
> > 
> > With your patch the problem has gone away. Is there a way to especially
> > stress the system in that regard?
> 
> 
> Its a failed allocation at NETDEV_REGISTER time. I guess you could
> keep unloading + reloading the driver module to try to reproduce it.

If that is the cause, why doesn't it strike from the very beginning? How
come it fails after some time?

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-13 11:21       ` Oliver Neukum
@ 2007-06-13 11:25         ` Patrick McHardy
  2007-06-13 11:55           ` Oliver Neukum
  0 siblings, 1 reply; 14+ messages in thread
From: Patrick McHardy @ 2007-06-13 11:25 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-kernel, Linux Netdev List, Herbert Xu

Oliver Neukum wrote:
> Am Mittwoch, 13. Juni 2007 schrieb Patrick McHardy:
>>>>
>>>>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.
>>>
>>>
>>>With your patch the problem has gone away. Is there a way to especially
>>>stress the system in that regard?
>>
>>
>>Its a failed allocation at NETDEV_REGISTER time. I guess you could
>>keep unloading + reloading the driver module to try to reproduce it.
> 
> 
> If that is the cause, why doesn't it strike from the very beginning? How
> come it fails after some time?


It might also be a failed in_ifaddr allocation. In that case my patch
shouldn't help though.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-13 11:25         ` Patrick McHardy
@ 2007-06-13 11:55           ` Oliver Neukum
  0 siblings, 0 replies; 14+ messages in thread
From: Oliver Neukum @ 2007-06-13 11:55 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: linux-kernel, Linux Netdev List, Herbert Xu

Am Mittwoch, 13. Juni 2007 schrieb Patrick McHardy:
> Oliver Neukum wrote:
> > Am Mittwoch, 13. Juni 2007 schrieb Patrick McHardy:
> >>>>
> >>>>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.
> >>>
> >>>
> >>>With your patch the problem has gone away. Is there a way to especially
> >>>stress the system in that regard?
> >>
> >>
> >>Its a failed allocation at NETDEV_REGISTER time. I guess you could
> >>keep unloading + reloading the driver module to try to reproduce it.
> > 
> > 
> > If that is the cause, why doesn't it strike from the very beginning? How
> > come it fails after some time?
> 
> 
> It might also be a failed in_ifaddr allocation. In that case my patch
> shouldn't help though.

The problem is that I don't know how to provoke the failure. I might
be doing another workload today than yesterday. Perhaps I should
do several compilations like yesterday?

	Regards
		Oliver


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-12 14:06 ` Patrick McHardy
  2007-06-13  8:39   ` Oliver Neukum
@ 2007-06-14  3:53   ` Herbert Xu
  2007-06-14  3:56     ` David Miller
  1 sibling, 1 reply; 14+ messages in thread
From: Herbert Xu @ 2007-06-14  3:53 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Oliver Neukum, linux-kernel, Linux Netdev List

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@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
commit 6363097cc4d182f93788131b5d8f72aa91d950a0
Author: Herbert Xu <herbert@gondor.apana.org.au>
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@gondor.apana.org.au>
    Signed-off-by: David S. Miller <davem@davemloft.net>

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,

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: cannot set IP for ethernet
  2007-06-14  3:53   ` Herbert Xu
@ 2007-06-14  3:56     ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2007-06-14  3:56 UTC (permalink / raw)
  To: herbert; +Cc: kaber, oliver, linux-kernel, netdev

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 14 Jun 2007 13:53:41 +1000

> Actually in his case it's because 2.6.22-rc4-git2 doesn't have the
> following changeset.

It's on the way, it just hasn't been picked up yet.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-06-14  3:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-12 12:41 cannot set IP for ethernet Oliver Neukum
2007-06-12 13:31 ` Jan Engelhardt
2007-06-12 14:13   ` Oliver Neukum
2007-06-12 15:14     ` Jan Engelhardt
2007-06-12 15:15       ` Patrick McHardy
2007-06-12 16:41       ` Oliver Neukum
2007-06-12 14:06 ` Patrick McHardy
2007-06-13  8:39   ` Oliver Neukum
2007-06-13 11:14     ` Patrick McHardy
2007-06-13 11:21       ` Oliver Neukum
2007-06-13 11:25         ` Patrick McHardy
2007-06-13 11:55           ` Oliver Neukum
2007-06-14  3:53   ` Herbert Xu
2007-06-14  3:56     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox