netdev
[Top] [All Lists]

A bug in the Kernel?

To: netdev@xxxxxxxxxxx
Subject: A bug in the Kernel?
From: itkes@xxxxxxxxxxxxxxx
Date: Sun, 27 Feb 2005 19:00:29 +0300 (MSK)
Importance: Normal
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: SquirrelMail/1.4.4
Hello.

I think I have found a bug in the Linux Kernel.

Although Netlink is not a reliable protocol, the kernel must do everything
to transmit the correct information about networking subsystem state. For
example, if an application reuqests the routing table dump, the kernel
must send at least all the routes that had not been modified, added or
deleted during the dump operation.

Let us suppose the application to request the routing tabled dump. I heve
found that in some conditions, this application may not receive some
unchanged routes, if some other routes was deleted.

I have fixed the bug of routing tables dump, but same errors may occure in
process of net interfaces dump, routing rules dump etc. The patch to
kernel 2.6.11-rc5 is attached. I ask you to include it to the next kernel
release.

If you will add my code to the kernel, could I try to correct other bugs
of this type? I have almost finished correcting the routing rules dump.

Alex Itkes (Moscow State University).

P.S. After I have finished the patch, I found another bug in the Routing
Tables Dump. In function fn_hash_dump_bucket in fib_hash.c there is a
construction:
if (i<s_i)
        continue;
...
i++;
If the first "if" is true in first moment, "i" will never be increased and
some routes will be lost. My patch fixes this bug, too.

Attachment: patch-2.6.11-rc5-nl01.gz
Description: application/gzip-compressed

<Prev in Thread] Current Thread [Next in Thread>