From 27173c13e8daa4340d60cd88927c23ec1bc125dc Mon Sep 17 00:00:00 2001 From: Gary Jennejohn Date: Tue, 4 Apr 2000 09:20:53 +0000 Subject: [PATCH] Pass me the pointy hat. It was not a good idea to remove csu_header from struct cspace, it had ramifications which I didn't notice. Restore src/usr.sbin/ppp/slcompress.h to the way it was, since MAX_HDR was already defined as 128 there and it's a user program anyway. In sys/net/slcompress.h make MAX_HDR 128 intead of MLEN to avoid bloat. My apologies for any inconvenience. --- sys/net/slcompress.h | 7 ++++++- usr.sbin/ppp/slcompress.h | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/net/slcompress.h b/sys/net/slcompress.h index 4e20c3768c40..6959db0671bb 100644 --- a/sys/net/slcompress.h +++ b/sys/net/slcompress.h @@ -119,8 +119,13 @@ struct cstate { u_int16_t cs_hlen; /* size of hdr (receive only) */ u_char cs_id; /* connection # associated with this state */ u_char cs_filler; - struct ip cs_ip; /* ip/tcp hdr from most recent packet */ + union { + char csu_hdr[MAX_HDR]; + struct ip csu_ip; /* ip/tcp hdr from most recent packet */ + } slcs_u; }; +#define cs_ip slcs_u.csu_ip +#define cs_hdr slcs_u.csu_hdr /* * all the state data for one serial line (we need one of these diff --git a/usr.sbin/ppp/slcompress.h b/usr.sbin/ppp/slcompress.h index 85aee7432f95..099771be134f 100644 --- a/usr.sbin/ppp/slcompress.h +++ b/usr.sbin/ppp/slcompress.h @@ -102,8 +102,14 @@ struct cstate { u_short cs_hlen; /* size of hdr (receive only) */ u_char cs_id; /* connection # associated with this state */ u_char cs_filler; - struct ip cs_ip; /* ip/tcp hdr from most recent packet */ -}; + union { + char csu_hdr[MAX_HDR]; + struct ip csu_ip; /* ip/tcp hdr from most recent packet */ + } slcs_u; + }; + +#define cs_ip slcs_u.csu_ip +#define cs_hdr slcs_u.csu_hdr /* * all the state data for one serial line (we need one of these