Most recent kernel where this bug did not occur: 2.6.21.x
Distribution: no matter
Hardware Environment: generic i686
Software Environment: GNU
Not all ips are shown by "ip addr show" command when IPs number assigned to an interface is more than 60-80 (in fact it depends on broadcast/label etc presence on each address).
Steps to reproduce:
It's terribly simple to reproduce:
# for i in $(seq 1 100); do ip ad add 10.0.$i.1/24 dev eth10 ; done
# ip addr show
this will _not_ show all IPs.
Looks like the problem is in netlink/ipv4 message processing.
Sure I tried _all_ iproute2 versions, including one for 2.6.22 kernel.
This probably isn't a kernel bug.
In iproute2 source the response for netlink (lib/netlink.c) is declared
as 16384 bytes. This limits maximum size of responses. Try making it
unfortunately, it is.
I'm debugging the kernel now and see that netlink subsystem fills only 3804 bytes of its _internal_ skb.
I'd be glad to see anything limited to 16k. But even Iproute2 sources are ok.
That 16k buffer is only for 1 cycle reading. But the cycle is being continued while whole kernel response is not read :)
So, 16k is not a problem.
Even more. To show you the real kernel true.
The example I provided shows last IP 10.0.72.1 (or 70, 71 - no matter)
But look here for another example ;)
# for i in $(seq 1 100); do ip ad add 10.0.$i.1/24 broadcast 10.0.$i.255 dev eth0 ; done
# ip addr show
and you will see that it's showing only 63 (possible 64) ips only!!!
Internally, I saw that it's just filling 1 its buffer (those 3804 bytes) and stops. And broadcast info sure takes some space - so, IPs put in the buffer is smaller when broadcast defined (label, I believe, will make the listed IPs number even smaller).
On Fri, 10 Aug 2007 05:58:25 -0700 (PDT) email@example.com wrote:
> Summary: Not all IPs are shown by "ip addr show"
> Product: Networking
> Version: 2.5
> KernelVersion: >=2.6.22 (2.6.23.x too)
> Platform: All
> OS/Version: Linux
> Tree: Mainline
> Status: NEW
> Severity: high
> Priority: P1
> Component: IPV4
> AssignedTo: firstname.lastname@example.org
> ReportedBy: email@example.com
> Most recent kernel where this bug did not occur: 2.6.21.x
> Distribution: no matter
> Hardware Environment: generic i686
> Software Environment: GNU
> Problem Description:
> Not all ips are shown by "ip addr show" command when IPs number assigned to
> interface is more than 60-80 (in fact it depends on broadcast/label etc
> presence on each address).
> Steps to reproduce:
> It's terribly simple to reproduce:
> # for i in $(seq 1 100); do ip ad add 10.0.$i.1/24 dev eth10 ; done
> # ip addr show
> this will _not_ show all IPs.
> Looks like the problem is in netlink/ipv4 message processing.
Created attachment 12346 [details]
Just found the problem reason (patch is attached).
Comitters should be careful with goto'es... ;)
and what about committing this fix into .23 rc/git branch ?
Please submit patch to firstname.lastname@example.org with proper Signed-off-by:
Fixed in 2.6.23-rc6
In fact in 2.6.23-rc6-git1 ;)