* ethernet patch
@ 2004-03-02 20:46 Dmitry Semyonov
0 siblings, 0 replies; only message in thread
From: Dmitry Semyonov @ 2004-03-02 20:46 UTC (permalink / raw)
To: netdev
[-- Attachment #1: Type: text/plain, Size: 1802 bytes --]
Hello,
It seems there is a problem in the network layer of the 2.6.3 kernel. When
IFF_NOARP is enabled on the device, the first outgoing packet is getting
lost.
I tried the following configuration: two computers are connected with the
network cable. On both sides ARP is switched off on the network adapters,
and MAC addresses are configured manually using the arp utility. When I ping
one computer from another, I am getting ping replies only starting from the
third one. The reason is the following: network layer is caching hardware
(ethernet) headers. When I send a packet, this cache is examined for the
proper header. If it is not found, the arp table is examined too. The data
from the arp table is used for constructing the header for the packet
(eth_header() in eth.c) and creating a cache entry (eth_hard_header() in
eth.c). The cache entry is created correctly, but the header for outgoing
packet in case of IFF_NOARP switched on the device is filled with zero
destination address (MAC). So this packet is then lost. Next time the cache
entry is used, and the packets are send correctly. So when I am pinging one
computer from another the first ping request is lost so there is no answer
for it. The second ping request gets to the other computer, and it sends a
reply, wich is lost on the other side. And only for the third packet I get a
reply from the other computer.
This causes for example internet pages open very slowly on the links with
ARP turned off, because the first request is lost, and it takes a while when
the client resends it.
Please, include the attached patch in the kernel. It fixes this problem on
the 2.6.3 kernel. The same problem is in the 2.4.18 kernel. I verified it on
both 2.6.3 and 2.4.18 kernels and they work fine after the correction.
Thank you.
Dmitry
[-- Attachment #2: patch-2.6.3-ethernet --]
[-- Type: application/octet-stream, Size: 848 bytes --]
--- linux-2.6.3/net/ethernet/eth.c 2004-02-18 06:58:03.000000000 +0300
+++ linux-2.6.3-patched/net/ethernet/eth.c 2004-03-02 21:15:46.000000000 +0300
@@ -31,6 +31,7 @@
* older network drivers and IFF_ALLMULTI.
* Christer Weinigel : Better rebuild header message.
* Andrew Morton : 26Feb01: kill ether_setup() - use netdev_boot_setup().
+ * Dmitry Semenov : 29Feb04: eth_header() - bug fix for IFF_NOARP devices
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -101,7 +102,7 @@
* Anyway, the loopback-device should never use this function...
*/
- if (dev->flags & (IFF_LOOPBACK|IFF_NOARP))
+ if (dev->flags & IFF_LOOPBACK)
{
memset(eth->h_dest, 0, dev->addr_len);
return ETH_HLEN;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-03-02 20:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-02 20:46 ethernet patch Dmitry Semyonov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).