Re: 2.1.28 and telnet,rlogin,etc

David S. Miller (davem@jenolan.rutgers.edu)
Tue, 4 Mar 1997 07:24:12 -0500


From: Pete Clements <clem@clem.digital.net>
Date: Tue, 4 Mar 1997 07:13:20 -0500 (EST)

Looks like inbound telnet and rlogin broke. Telnet works but first part
of return lost, i.e screen a little hosed. Cannot make a rlogin.

ssh is working fine.

Please tell me if this makes the problem go away. A little IPV6 UDP
fix has snuck into here as well ;-)

diff -u --recursive --new-file --exclude=CVS vanilla/v2.1.28/linux/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
--- vanilla/v2.1.28/linux/net/ipv4/tcp_ipv4.c Mon Mar 3 12:37:44 1997
+++ linux/net/ipv4/tcp_ipv4.c Tue Mar 4 05:37:05 1997
@@ -230,8 +230,7 @@
}
sk->hashtable = NULL;
}
- if(sk->state == TCP_CLOSE && sk->dead)
- tcp_sk_unbindify(sk);
+ tcp_sk_unbindify(sk);
SOCKHASH_UNLOCK();
}

@@ -251,8 +250,8 @@
}
htable = &((*htable)->next);
}
+ tcp_sk_unbindify(sk);
}
- tcp_sk_unbindify(sk);
htable = NULL;
if(state != TCP_CLOSE || !sk->dead) {
if(state == TCP_LISTEN) {
diff -u --recursive --new-file --exclude=CVS vanilla/v2.1.28/linux/net/ipv6/udp.c linux/net/ipv6/udp.c
--- vanilla/v2.1.28/linux/net/ipv6/udp.c Mon Mar 3 12:37:45 1997
+++ linux/net/ipv6/udp.c Tue Mar 4 05:41:58 1997
@@ -7,7 +7,7 @@
*
* Based on linux/ipv4/udp.c
*
- * $Id: udp.c,v 1.8 1997/02/28 09:56:35 davem Exp $
+ * $Id: udp.c,v 1.9 1997/03/04 10:41:59 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -324,9 +324,10 @@
if(skb==NULL)
return err;

- truesize = skb->tail - skb->h.raw - sizeof(struct udphdr);
+ truesize=ntohs(((struct udphdr *)skb->h.raw)->len) - sizeof(struct udphdr);

copied=truesize;
+
if(copied>len)
{
copied=len;
@@ -357,7 +358,7 @@
if (skb->protocol == __constant_htons(ETH_P_IP))
{
ipv6_addr_set(&sin6->sin6_addr, 0, 0,
- __constant_htonl(0xffff), skb->nh.iph->daddr);
+ __constant_htonl(0xffff), skb->nh.iph->saddr);
}
else
{