From nobody  Sun Nov 17 20:20:29 1996
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.7.5/8.7.3) id UAA08013;
          Sun, 17 Nov 1996 20:20:29 -0800 (PST)
Message-Id: <199611180420.UAA08013@freefall.freebsd.org>
Date: Sun, 17 Nov 1996 20:20:29 -0800 (PST)
From: torii@tcd.hitachi.co.jp
To: freebsd-gnats-submit@freebsd.org
Subject: vjcomp problem in iij-ppp
X-Send-Pr-Version: www-1.0

>Number:         2046
>Category:       bin
>Synopsis:       vjcomp problem in iij-ppp
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    brian
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 17 20:30:11 PST 1996
>Closed-Date:    Wed May 7 16:31:03 PDT 1997
>Last-Modified:  Wed May  7 16:31:58 PDT 1997
>Originator:     Nobuyoshi Torii
>Release:        2.1.0-RELEASE
>Organization:
Telecommunications Division, Hitachi, Ltd., Japan
>Environment:
FreeBSD pc07098.tcd.hitachi.co.jp 2.1.0-RELEASE FreeBSD 2.1.0-RELEASE #0: Wed Apr 10 10:16:09 JST 1996
root@pc07098.tcd.hitachi.co.jp:/usr/src/sys/compile/FLORA  i386

>Description:
Ping or UDP packets are sometimes dropped in use of iij-ppp.
Iij-ppp attempts to use VJ compress even if the packet is not TCP.
PPP packet's protocol field of UDP or ICMP is sometimes filled by
 COMPRESSED_TCP or UNCOMPRESSED_TCP.

Incidentially, iij-ppp log buffer is too small to take async or
hdlc logging.
>How-To-Repeat:
Use ping or tftp put from iij-ppp side.
Ping packet loss ratio is about 6 or 7 percent.
Tftp put will be faild by timeout.
>Fix:
*** ppp-2.1.0/vjcomp.c  Fri Nov 15 20:41:44 1996
--- ppp.patch/vjcomp.c  Fri Nov 15 20:40:55 1996
***************
*** 51,57 ****
  #ifdef DEBUG
    logprintf("SendPppFrame: proto = %x\n", IpcpInfo.his_compproto);
  #endif
!   if (cproto== PROTO_VJCOMP) {
      type = sl_compress_tcp(bp, (struct ip *)MBUF_CTOP(bp), &cslc, IpcpInfo.his_compproto & 0xff);

  #ifdef DEBUG
--- 51,58 ----
  #ifdef DEBUG
    logprintf("SendPppFrame: proto = %x\n", IpcpInfo.his_compproto);
  #endif
!   if (((struct ip *)MBUF_CTOP(bp))->ip_p == IPPROTO_TCP
!       && cproto== PROTO_VJCOMP) {
      type = sl_compress_tcp(bp, (struct ip *)MBUF_CTOP(bp), &cslc, IpcpInfo.his_compproto & 0xff);

  #ifdef DEBUG

*** ppp-2.1.0/log.c     Fri Nov 15 20:41:49 1996
--- ppp.patch/log.c     Fri Nov 15 20:40:55 1996
***************
*** 41,47 ****
  #ifdef USELOGFILE
  static FILE *logfile;
  #endif
! static char logbuff[2000];
  static char *logptr;
  static struct mbuf *logtop;
  static struct mbuf *lognext;
--- 41,47 ----
  #ifdef USELOGFILE
  static FILE *logfile;
  #endif
! static char logbuff[MAX_MRU*3+(MAX_MRU/16+1)*22+80];
  static char *logptr;
  static struct mbuf *logtop;
  static struct mbuf *lognext;

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: brian 
Responsible-Changed-When: Tue Apr 15 09:48:11 PDT 1997 
Responsible-Changed-Why:  
I'll take a look at it (and merge the patch?) 
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Wed May 7 16:31:03 PDT 1997 
State-Changed-Why:  
The patches provided have been submitted to -current. 
They will be back-ported to the 2.2 branch once "proven" in -current. 
>Unformatted:
