Skip to contentSkip to conversation

TCP/IPv6 broken in Linux 2.5.64?

DISCUSSION Erik Hensema 4 participants 7 messages Mar 18, 2003 – Mar 20, 2003

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to upgrade to Linux 2.5.x from 2.4.x. It seems to be working fine, except for IPv6: a TCP session can be established, but I can't send data. I can receive it though.

This is a tcpdump session of me telnetting to the smtp port of my server, with is on local ethernet; native ipv6:

14:01:24.169321 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: S 3441486378:3441486378(0) win 5760 <mss 1440,sackOK,timestamp 3067201 0,nop,wscale 0> 14:01:24.169532 dexter.ipv6.hensema.net.smtp > bender.ipv6.hensema.net.32926: S 2141989668:2141989668(0) ack 3441486379 win 5712 <mss 1440,sackOK,timestamp 241707598 3067201,nop,wscale 0> 14:01:24.170104 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: . ack 1 win 5760 <nop,nop,timestamp 3067202 241707598>
14:01:24.187583 dexter.ipv6.hensema.net.47911 > bender.ipv6.hensema.net.ident: S 2130642408:2130642408(0) win 5760 <mss 1440,sackOK,timestamp 241707600 0,nop,wscale 0> 14:01:24.187612 bender.ipv6.hensema.net.ident > dexter.ipv6.hensema.net.47911: R 0:0(0) ack 2130642409 win 0
14:01:24.198246 dexter.ipv6.hensema.net.smtp > bender.ipv6.hensema.net.32926: P 1:87(86) ack 1 win 5712 <nop,nop,timestamp 241707601 3067202> 14:01:24.198285 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: . ack 87 win 5760 <nop,nop,timestamp 3067230 241707601>
14:01:27.397607 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: P 1:7(6) ack 87 win 5760 <nop,nop,timestamp 3070430 241707601>
14:01:27.598549 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: P 1:7(6) ack 87 win 5760 <nop,nop,timestamp 3070631 241707601>
14:01:28.199460 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: P 1:7(6) ack 87 win 5760 <nop,nop,timestamp 3071232 241707601>
14:01:29.223402 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: P 1:7(6) ack 87 win 5760 <nop,nop,timestamp 3072256 241707601>
14:01:31.015042 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: P 1:7(6) ack 87 win 5760 <nop,nop,timestamp 3074048 241707601>
14:01:34.342488 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: P 1:7(6) ack 87 win 5760 <nop,nop,timestamp 3077376 241707601>
14:01:40.997436 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: P 1:7(6) ack 87 win 5760 <nop,nop,timestamp 3084032 241707601>
14:01:53.795498 bender.ipv6.hensema.net.32925 > dexter.ipv6.hensema.net.smtp: P 0:6(6) ack 1 win 5760 <nop,nop,timestamp 3096832 241706937>
14:01:54.051386 bender.ipv6.hensema.net.32926 > dexter.ipv6.hensema.net.smtp: P 1:7(6) ack 87 win 5760 <nop,nop,timestamp 3097088 241707601>

I do see the SMTP greeting. However, when I send a RSET, there's no response from the server.

IPv4 is working fine. icmpv6/ipv6 and udp/ipv6 too.

bender is running linux 2.5.64. dexter is running linux 2.4.18, mostly the SuSE 8.0 version (that is: quite heavily patched).

Signature · 1 line
Erik Hensema ([email protected])
#1 lore raw

Hi,

Quoted 1 line

bender is running linux 2.5.64. dexter is running linux 2.4.18,

Are you a cartoons fan ? Dexter's laboratory, Futurama ? That's a cool way to name hosts. I am inspired :)

Regards,
Maciej

#2 lore raw
In reply to Erik Hensema
Quoted 5 lines · Erik Hensema

Hi,

I'm trying to upgrade to Linux 2.5.x from 2.4.x. It seems to be working fine, except for IPv6: a TCP session can be established, but I can't send data. I can receive it though.

I can confirm this. 2.5.65 can connect to other hosts out there, like ipv6 irc servers, or an IPv6 zonetransfer. However, when I try to ssh from 2.5.65 to another 2.5.65, nothing happens.

2.4.18 can also ssh to 2.5.65.

So we have:

       to:	2.4.18	2.5.65

from:
2.4.18 OK OK
2.5.65 OK ERROR

tcpdump from 2.5.65 to 2.5.65:

25.987220 hostA.33180 > hostB.22: S 2721590261:2721590261(0) win 5760

	<mss 1440,sackOK,timestamp 15005149 0,nop,wscale 0>

25.987490 hostB.22 > hostA.33180: S 2377513523:2377513523(0)

	ack 2721590262 win 5712 
	<mss 1440,sackOK,timestamp 5200381 15005149,nop,wscale 0>

25.987622 hostA.33180 > hostB.22: . ack 1 win 5760

	<nop,nop,timestamp 15005149 5200381>

25.993273 hostB.22 > hostA.33180: P 1:41(40) ack 1 win 5712

	<nop,nop,timestamp 5200387 15005149>
26.193443 hostB.22 > hostA.33180: P 1:41(40) ack 1 win 5712 
	<nop,nop,timestamp 5200588 15005149>
26.757236 hostB.22 > hostA.33180: P 1:41(40) ack 1 win 5712 
	<nop,nop,timestamp 5201152 15005149>

The originating host does not ACK the received data, it appears. No IPSEC is involved with this.

Regards,

bert

Signature · 3 lines
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
http://netherlabs.nl                         Consulting
#3 lore raw
Quoted 6 lines · bert hubert

So we have:

       to:	2.4.18	2.5.65

from:
2.4.18 OK OK
2.5.65 OK ERROR

Ok, here is a counter example of 2.5.65 happily talking to 2.5.65, so it sometimes does work:

33.933107 hostC.33255 > hostB.22: SWE 3663286543:3663286543(0) win 5680

	<mss 1420,sackOK,timestamp 19198944 0,nop,wscale 0>
33.933203 hostB.22 > hostC.33255: S 3554639364:3554639364(0) ack 3663286544 
	win 5712 <mss 1440,sackOK,timestamp 15793123 19198944,nop,wscale 0>
33.999407 hostC.33255 > hostB.22: . ack 1 win 5680 
	<nop,nop,timestamp 19199006 15793123>
34.007239 hostB.22 > hostC.33255: P 1:41(40) ack 1 win 5712 
	<nop,nop,timestamp 15793197 19199006>
34.072108 hostC.33255 > hostB.22: . ack 41 win 5680 
	<nop,nop,timestamp 19199081 15793197>
34.091633 hostC.33255 > hostB.22: P 1:40(39) ack 41 win 5680
	<nop,nop,timestamp 19199081 15793197>
34.097058 hostB.22 > hostC.33255: . ack 40 win 5712 
	<nop,nop,timestamp 15793286 19199081>

Here is a macos X laptop, hostD trying and failing talk to hostB, which runs 2.5.65:

16.829237 hostD.56023 > hostB.22: S 3755233012:3755233012(0) win 32768

	<mss 1440,nop,wscale 0,nop,nop,timestamp 3371673393 0>
16.829482 hostB.22 > hostD.56023: S 3776737964:3776737964(0) ack 3755233013 
	win 5712 <mss 1440,nop,nop,timestamp 6571699 3371673393,nop,wscale 0>
17.296953 hostD.56023 > hostB.22: . ack 1 win 32844 
	<nop,nop,timestamp 3371673394 6571699>
17.301934 hostB.22 > hostD.56023: P 1:41(40) ack 1 win 5712
	<nop,nop,timestamp 6572172 3371673394>
18.953105 hostB.22 > hostD.56023: P 1:41(40) ack 1 win 5712
	<nop,nop,timestamp 6573824 3371673394>
21.768126 hostB.22 > hostD.56023: P 1:41(40) ack 1 win 5712
	<nop,nop,timestamp 6576640 3371673394>
27.398163 hostB.22 > hostD.56023: P 1:41(40) ack 1 win 5712
	<nop,nop,timestamp 6582272 3371673394>

Closer inspection shows:
17:47:39.206188 HostB.22 > HostD.56030: P [bad tcp cksum 407f!] 1:41(40) ack 1 win 5712 <nop,nop,timestamp 6894188 3371674038> (len 72, hlim 64)

Note the bad checksum! It appears hostB is the culprit here, the one constant factor in the entire story. HostB is a Pentium PRO, the other machines aren't. Perhaps this might be it?

This dump was run on hostB, so no chance of bad media there.

Let me know if I can do more research - icmp6 works just fine.

Regards,

bert

Signature · 3 lines
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
http://netherlabs.nl                         Consulting
#4 lore raw
In reply to bert hubert

Hello!

Quoted 1 line

irc servers, or an IPv6 zonetransfer. However, when I try to ssh from 2.5.65

Try this. I have just found this lost patch, it is from 2.4 tree, but it should fit to 2.5 as well.

Alexey

===== net/ipv6/tcp_ipv6.c 1.19 vs edited =====

net/ipv6/tcp_ipv6.c +1 -1
@@ -983,7 +983,7 @@
 	struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
 
 	if (skb->ip_summed == CHECKSUM_HW) {
-		th->check = csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP,  0);
+		th->check = ~csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP,  0);
 		skb->csum = offsetof(struct tcphdr, check);
 	} else {
 		th->check = csum_ipv6_magic(&np->saddr, &np->daddr, len, IPPROTO_TCP, 
#5 lore raw
Quoted 6 lines · On Thu, Mar 20, 2003 at 06:49:49PM +0300, [email protected] wrote:

Hello!

Quoted 1 line

irc servers, or an IPv6 zonetransfer. However, when I try to ssh from 2.5.65

Try this. I have just found this lost patch, it is from 2.4 tree, but it should fit to 2.5 as well.

This has solved my problem 100%. The earlier mentioned hostA and hostB can now cheerfully connect to eachother. Everything else I try works too.

So I suggest this be sent linus-wards. Thanks!

Regards,

bert

Signature · 3 lines
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO
http://netherlabs.nl                         Consulting
#6 lore raw
Quoted 5 lines · bert hubert
Quoted 4 lines · On Thu, Mar 20, 2003 at 06:49:49PM +0300, [email protected] wrote:

Hello!

Quoted 1 line

irc servers, or an IPv6 zonetransfer. However, when I try to ssh from 2.5.65

Quoted 7 lines
Quoted 2 lines

Try this. I have just found this lost patch, it is from 2.4 tree, but it should fit to 2.5 as well.

This has solved my problem 100%. The earlier mentioned hostA and hostB can now cheerfully connect to eachother. Everything else I try works too.

So I suggest this be sent linus-wards. Thanks!

I can confirm that this fixed my IPv6 problems on 2.5.x.

Signature · 1 line
Erik Hensema ([email protected])