Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Feb 2001 12:04:46 -0300
From:      Sergio de Souza Prallon <prallon@tmp.com.br>
To:        Andreas Haug <andreas.haug@this.net>
Cc:        freebsd-isdn@FreeBSD.ORG
Subject:   Re: TCP Data corruption 0.96/4.2/T-online
Message-ID:  <20010228120446.A8945@tmp.com.br>
In-Reply-To: <BPEALPIBIIIGANDPMMHNMEDOCAAA.andreas.haug@this.net>; from andreas.haug@this.net on Sat, Feb 24, 2001 at 11:28:11AM %2B0100
References:  <BPEALPIBIIIGANDPMMHNMEDOCAAA.andreas.haug@this.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Feb 24, 2001 at 11:28:11AM +0100, Andreas Haug wrote:
> 
> 
> Hi. I have a very stange problem on i4b beta Version 0.96.00 / October 2000.
> Whenever I transmit some data, for example by SMTP or FTP, it gets
> corrupted. Since this day I thought that any transfer through TCP is
> protected by a good enough check sum. Perhaps this was a bad assumption.
> 
> Example: On a remote machine, I generate a file
> 
> # bash-2.00$ dd if=/dev/zero of=zero bs=1k count=1024
> 
> It looks quite empty:
> 
> # bash-2.00$ od -a zero
> # 0000000  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> # *
> 
> then I ftp it on my system. No problem. Then I ftp it back to the remote
> system. There, it now looks like this:
> 
> # bash-2.00$ od -a zero
> # 0000000  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> # *
> # 0063740    @ nul nul nul nul nul nul nul nul ack nul dc4  c3  fe   % nak
> # 0063760    >  9e dc4   c  de  92  cr  91  dc   ;   Y   m  ba   G  bf  b2
> # 0064000  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> # *
> # 0353740    @ nul nul nul nul nul nul nul nul ack nul dc4  c3  fe   % nak
> # 0353760    >  9e dc4   c  de  92  cr  91  dc   ;   Y   m   R  a9  c0  b2
> # 0354000  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> # *
> # 2523740    @ nul nul nul nul nul nul nul nul ack nul dc4  c3  fe   % nak
> # 2523760    >  9e dc4   c  de  92  cr  91  dc   ;   Y   m   F  98  c9  b2
> # 2524000  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> # *
> # 2663740    @ nul nul nul nul nul nul nul nul ack nul dc4  c3  fe   % nak
> # 2663760    >  9e dc4   c  de  92  cr  91  dc   ;   Y   m   ^   C  ca  b2
> # 2664000  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> # *
> # 2753740    @ nul nul nul nul nul nul nul nul ack nul dc4  c3  fe   % nak
> # 2753760    >  9e dc4   c  de  92  cr  91  dc   ;   Y   m   >  cc  ca  b2
> # 2754000  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> # *
> # 3223740    @ nul nul nul nul nul nul nul nul ack nul dc4  c3  fe   % nak
> # 3223760    >  9e dc4   c  de  92  cr  91  dc   ;   Y   m  9e  vt  cc  b2
> # 3224000  nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul nul
> # *
> # 4000000
> 
> Another try gives the same problem(s), only a different offset.
> 
> My system is running
> 
> # FreeBSD jessie.this.net 4.2-RELEASE
> # FreeBSD 4.2-RELEASE #2: Sun Dec  3 18:49:19 CET 2000
> # root@jessie.this.net:/usr/src/sys/compile/AJH0011  i386
> 
> With the i4b part of the kernel config AJH0011 looking like
> 
> # options "TEL_S0_16_3"
> # device  isic0 at isa? port 0xd80 irq 5 flags 3
> # pseudo-device   "i4bq921"
> # pseudo-device   "i4bq931"
> # pseudo-device   "i4b"
> # pseudo-device   "i4btrc"        4
> # pseudo-device   "i4bctl"
> # pseudo-device   "i4brbch"       4
> # pseudo-device   "i4btel"        2
> # options         IPR_VJ
> # pseudo-device   "i4bipr"        4
> # pseudo-device   "i4bisppp"      4
> 
> The remote system is an old FreeBSD machine but I have verifyed the problem
> to occur on other systems, too, so the remote system can't be the problem. I
> am dialing into T-Online. As I said: Downloading anything isn't a problem,
> only uploading.
> 
> Any hint where I should look to find the problem? Thanks.
> 
> Thanks,
> 
> andreas.
> 
> 
> P.S.: In hex, ist looks like this:
> 
> 0727740     0040    0000    0000    0000    0600    1400    fec3    1525
> 0727760     e23e    e7fd    e7c1    b30d    9063    9f20    005c    f113
> 0730000     0000    0000    0000    0000    0000    0000    0000    0000
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isdn" in the body of the message


Hi,

You failed to state what L2 driver are you using. Assuming it's the ISP
(kernel SPPP) I may have the solution to you problems. Apply the following
patch to your I4B src tree, rebuild & and install the kernel. Let me know
if it worked.


[]'s

--
Prallon

----8<--------8<--------8<--------8<--------8<--------8<--------8<----
diff -rcN i4b/driver/i4b_ispppsubr.c i4b_0.96b_itjc/driver/i4b_ispppsubr.c
*** i4b/driver/i4b_ispppsubr.c	Fri Sep  1 11:11:51 2000
--- i4b_0.96b_itjc/driver/i4b_ispppsubr.c	Thu Jan 11 10:07:26 2001
***************
*** 492,500 ****
  			    SPP_FMT "input packet is too small, %d bytes\n",
  			    SPP_ARGS(ifp), m->m_pkthdr.len);
  	  drop:
  		++ifp->if_ierrors;
  		++ifp->if_iqdrops;
- 		m_freem (m);
  		return;
  	}
  
--- 492,501 ----
  			    SPP_FMT "input packet is too small, %d bytes\n",
  			    SPP_ARGS(ifp), m->m_pkthdr.len);
  	  drop:
+ 		m_freem (m);
+ 	  drop2:
  		++ifp->if_ierrors;
  		++ifp->if_iqdrops;
  		return;
  	}
  
***************
*** 560,585 ****
  #ifdef SPPP_VJ
  		case PPP_VJ_COMP:
  			if (sp->state[IDX_IPCP] == STATE_OPENED) {
! 				int len;
  
! 				if ((len = sl_uncompress_tcp(
! 				   (u_char **)&m->m_data, m->m_len,
! 				   TYPE_COMPRESSED_TCP, &sp->pp_comp)) <= 0)
  					goto drop;
! 				m->m_len = m->m_pkthdr.len = len;
  				schednetisr (NETISR_IP);
  				inq = &ipintrq;
  			}
  			break;
  		case PPP_VJ_UCOMP:
  			if (sp->state[IDX_IPCP] == STATE_OPENED) {
! 				int len;
  
! 				if ((len = sl_uncompress_tcp(
! 				   (u_char **)&m->m_data, m->m_len,
! 				   TYPE_UNCOMPRESSED_TCP, &sp->pp_comp)) <= 0)
  					goto drop;
! 				m->m_len = m->m_pkthdr.len = len;
  				schednetisr (NETISR_IP);
  				inq = &ipintrq;
  			}
--- 561,595 ----
  #ifdef SPPP_VJ
  		case PPP_VJ_COMP:
  			if (sp->state[IDX_IPCP] == STATE_OPENED) {
! 				u_char *iphdr;
! 				int hlen, vjlen;
  
! 				if ((vjlen = sl_uncompress_tcp_core(m->m_data,
! 				   m->m_len, m->m_len, TYPE_COMPRESSED_TCP,
! 				   &sp->pp_comp, &iphdr, &hlen)) <= 0)
  					goto drop;
! 
! 				m_adj(m, vjlen);
! 
! 				M_PREPEND(m, hlen, M_DONTWAIT);
! 				if (m == NULL)
! 					goto drop2;
! 				bcopy(iphdr, mtod(m, u_char *), hlen);
! 
  				schednetisr (NETISR_IP);
  				inq = &ipintrq;
  			}
  			break;
  		case PPP_VJ_UCOMP:
  			if (sp->state[IDX_IPCP] == STATE_OPENED) {
! 				u_char *iphdr;
! 				int hlen;
  
! 				if (sl_uncompress_tcp_core(m->m_data,
! 				   m->m_len, m->m_len, TYPE_UNCOMPRESSED_TCP,
! 				   &sp->pp_comp, &iphdr, &hlen) != 0)
  					goto drop;
! 
  				schednetisr (NETISR_IP);
  				inq = &ipintrq;
  			}
----8<--------8<--------8<--------8<--------8<--------8<--------8<----

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010228120446.A8945>