Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jul 1997 16:32:28 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        freebsd-hackers@freebsd.org
Subject:   VJ compression and MAX_HDR
Message-ID:  <199707062332.QAA13618@bubba.whistle.com>

next in thread | raw e-mail | index | archive | help

In slcompress.h, MAX_HDR is defined so:

  #define MAX_HDR MLEN          /* XXX 4bsd-ism: should really be 128 */

MLEN is like 108 or something.

This means that when Van Jacobson compression is active, any packets
sent to us with combined IP and TCP header length greater than MLEN
will be dropped, always.

This is an admittedly rare case, but my question is, why was this
done? What code would break if MAX_HDR is changed back to 128?

Searching for "MAX_HDR" in every source file in /usr/src/sys shows
that it only appears in slcompress.c and slcompress.h; moreover,
the code in if_ppp.c and if_sl.c seems to properly handle uncompressed
headers having length greater than MLEN (from a cursory glance).

Therefore, may I propose the following patch? Or else someone please
elighten me.

Thanks,
-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

Index: slcompress.h
===================================================================
RCS file: /cvs/freebsd/src/sys/net/slcompress.h,v
retrieving revision 1.9
diff -c -r1.9 slcompress.h
*** 1.9	1996/01/30 22:58:03
--- slcompress.h	1997/07/06 23:21:52
***************
*** 42,48 ****
  #define _NET_SLCOMPRESS_H_
  
  #define MAX_STATES 16		/* must be > 2 and < 256 */
! #define MAX_HDR MLEN		/* XXX 4bsd-ism: should really be 128 */
  
  /*
   * Compressed packet format:
--- 42,48 ----
  #define _NET_SLCOMPRESS_H_
  
  #define MAX_STATES 16		/* must be > 2 and < 256 */
! #define MAX_HDR 128		/* max size of combined IP + TCP headers */
  
  /*
   * Compressed packet format:



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