[1063] in linux-net channel archive
Yet more bugfixes
daemon@ATHENA.MIT.EDU (Alan Cox)
Wed Sep 6 16:12:44 1995
From: Alan Cox <alan@cymru.net>
To: linux-net@vger.rutgers.edu, torvalds@cs.Helsinki.FI
Date: Wed, 6 Sep 1995 09:38:11 +0100 (BST)
*
* Fix the IPIP bug. Its quite a good one. The tunnel driver
* erroneously doesn't clear the header_cache method (bug 1) causing
* the kernel to do ethernet header caches on an IPIP frame (bad move),
* and the number 2 there is a bug in ip_build_xmit about setting
* skb->arp=1 for devices with no hard_header method. This may also
* have caused a few other bugs with 1.3.2x.
*
* Also the ARP fix posted to the channel by Craig Schlenter is in this
* batch.
*
__
--/ / Brought to you via the worlds first SMP linux machine -------------------
-/ /_______ inux/SMP - sponsored by Caldera Inc http://www.caldera.com=========
/_________/====================================================================
------Alan Cox <alan@cymru.net>, Custom Linux development +44 1792 297292------
--- drivers/net/tunnel.c.old Tue Sep 5 00:26:58 1995
+++ drivers/net/tunnel.c Tue Sep 5 22:20:28 1995
@@ -84,12 +84,16 @@
dev->open = &tunnel_open;
dev->stop = &tunnel_close;
#endif
+ /* Now stomp the bits that are different */
dev->type = ARPHRD_TUNNEL; /* IP tunnel hardware type (Linux 1.1.89) */
dev->flags |= IFF_NOARP;
dev->flags |= IFF_LOOPBACK; /* Why doesn't tunnel work without this? [ should do now - AC]*/
dev->addr_len=0;
dev->hard_header_len=0;
dev->hard_header=NULL;
+ dev->header_cache=NULL;
+ dev->rebuild_header=NULL;
+ /* End of stomp 8) */
return 0;
}
@@ -218,6 +222,7 @@
skb2->free=1;
skb_put(skb2,newlen);
iph=skb2->h.iph=(struct iphdr *)skb2->data;
+ skb2->ip_hdr=iph;
memcpy(skb2->h.iph, skb->data, ip_header_len );
memcpy(skb2->data + ip_header_len, skb->data, skb->len);
/* Free the old packet, we no longer need it */
--- net/ipv4/ip.c.old3 Tue Sep 5 22:33:02 1995
+++ net/ipv4/ip.c Tue Sep 5 22:33:02 1995
@@ -2572,6 +2572,8 @@
if(dev->hard_header(skb,dev,ETH_P_IP,NULL,NULL,0)>0)
skb->arp=1;
}
+ else
+ skb->arp=1;
skb->ip_hdr=iph=(struct iphdr *)skb_put(skb,length);
dev_lock_list();
if(!sk->ip_hdrincl)
--- net/ipv4/arp.c.old3 Tue Sep 5 22:49:10 1995
+++ net/ipv4/arp.c Tue Sep 5 22:50:14 1995
@@ -42,7 +42,9 @@
* Mike Shaver : RFC1122 checks.
* Jonathan Naylor : Only lookup the hardware address for
* the correct hardware type.
- * Germano Caronni : Assorted subtle races
+ * Germano Caronni : Assorted subtle races.
+ * Craig Schlenter : Don't modify permanent entry
+ * during arp_rcv.
*/
/* RFC1122 Status:
@@ -93,9 +95,9 @@
/*
* This structure defines the ARP mapping cache. As long as we make changes
- * in this structure, we keep interrupts of. But normally we can copy the
- * hardware address and the device pointer in a local variable and then make
- * any "long calls" to send a packet out.
+ * in this structure, we keep interrupts off. But normally we can copy the
+ * hardware address and the device pointer in a local variable and then
+ * make any "long calls" to send a packet out.
*/
struct arp_table
@@ -811,11 +813,13 @@
if(entry)
{
/*
- * Entry found; update it.
+ * Entry found; update it only if it is not a permanent entry.
*/
- memcpy(entry->ha, sha, hlen);
- entry->hlen = hlen;
- entry->last_used = jiffies;
+ if (!(entry->flags & ATF_PERM)) {
+ memcpy(entry->ha, sha, hlen);
+ entry->hlen = hlen;
+ entry->last_used = jiffies;
+ }
if (!(entry->flags & ATF_COM))
{
/*
--- net/Changes.old3 Tue Sep 5 22:51:28 1995
+++ net/Changes Tue Sep 5 22:57:11 1995
@@ -188,7 +188,7 @@
o Generate BSD ENETDOWN errors [TESTED]
o Clean device unload bug<Walter Wolfgang> [IN]
--------->>>>> 1.3.23 <<<<<-------
+-------->>>>> 1.3.24 <<<<<-------
o Missing IGMP includes fixes [TESTED]
o Smarter buffer use options for sockets [IN]
@@ -197,6 +197,11 @@
o IOVEC's support repeated calls to copy more [IN]
o Zero fragment 'solaris nfs' bug fixed <Werner> [IN]
o NetROM supports sendmsg/recvmsg [IN]
+o Sendmsg verify_iovec bugfix [IN]
+o ARP PERM is really permanent now <Craig> [IN]
+o IPIP tunnels work fully we hope [IN]
+o Closing socket change (Marc Tamsky) [IN]
+o RFC1122 verification of tcp.c <Mike Shaver> [IN]
---------- Things Linus had for a while and not merged ----------------
@@ -211,9 +216,10 @@
o IPFW support for TOS changing (Al Longyear)
o /dev/skip /dev/ipah etc - Kernel/Usermode communications module (me)
o AF_UNIX garbage collect code
-o Closing socket change (Marc Tamsky)
o Faster closedown option for heavy use sites (me)
+o NEW NET TOOLS..... - wanted one net tools maintainer....
+
--------------- Tbings That Need Doing Before 1.4 ------------------
o Finish merging the bridge code
@@ -223,6 +229,7 @@
o Fast dev_grab_next() transmit reload function
and dev_push_failed() ??
o Faster ip_forward last hit cache [PENDING(GuruA0)]
+o L2 ip routing cache [PENDING(btv)]
o Forwarding queue control (+ fairness algorithms ??)
o IP forward flow control.
o Infinite PPP devices.
@@ -230,7 +237,7 @@
o Clean up RAW AX.25 sockets.
o Finish 802.2 Class I code to be compliant to the oddities of 802.2
o Full variable length AX.25 support [JSN doing]
-o Tidy BPQ support to use an bpqip tunnel device
+o Tidy BPQ support to use a bpqip tunnel device
o Strange eth0-eth3 bug
o Finish IPIP bug fixes
o Why doesnt the PROTO_UNREACH get sent ?
@@ -257,8 +264,8 @@
o IP firewalling performance - caching and radix trees.
o Zebedee
o 802.2 Class 2 services (eg netbios).
-o Multidrop KISS
-o Multicast routing
+o Multidrop KISS [NOW AVAILABLE IN USER MODE]
+o Multicast routing [STARTED BITS]
o IPX/Atalk/Netrom firewalling
Possible projects for victim^H^H^H^H^Holunteers
@@ -266,7 +273,7 @@
1. Verifying the correctness of implementation against RFC1122 and
making a list of violations (BSD is sufficiently screwed up you can't
-implement all of RFC1122 and talk to it usefully). [In progress - Mike
+implement all of RFC1122 and talk to it usefully). [Done - Mike
Shaver]
2. Verifying all the error returns match the BSD ones (grotty job I
@@ -302,7 +309,7 @@
from term].
8. Making SLIP/PPP dynamically allocate devices so you never run out
-of channels. [Taken/Done pending inclusion]
+of channels. [Done (pending inclusion in the PPP case)]
9. Implementing streams. Not as a blind slow SYS5.4 style copy but actually
working out how to do it so it runs like greased lightning. Quite a big
@@ -319,13 +326,14 @@
13. Mrouted Multicast routing. Or possibly MOSPF and others
as they become available
- [Some interest: see/join linux-multicast@www.linux.org.uk
+ [Started: see/join linux-multicast@www.linux.org.uk
if you wish to join in]
14. Bidirectional PLIP. Also PLIP for the newer style parallel ports.
15. 802.2LLC and thus Netbeui sockets. Becoming less important since the
-rumour is microsoft are phasing out netbeui for netbios/IP.
+rumour is microsoft are phasing out netbeui for netbios/IP. Microsoft have
+gone for netbios/funny-ipx-variant it seems in Win95, but TCP is selectable.
[Tentatively in progress]
16. X.25. This is one for a real head case with far too much time on