summaryrefslogtreecommitdiff
path: root/net/mppe-lkm
diff options
context:
space:
mode:
authorcube <cube>2005-04-29 11:41:29 +0000
committercube <cube>2005-04-29 11:41:29 +0000
commitf603e8e0b7b9f1bf556b5b2f2d3eb698455fe5bf (patch)
tree0036dcd3e0c51c12679feb2ce181866f973e66c1 /net/mppe-lkm
parentdd6443c86310478bdc83d5db04135195268ed531 (diff)
downloadpkgsrc-f603e8e0b7b9f1bf556b5b2f2d3eb698455fe5bf.tar.gz
No need to include ppp-comp-local.h on NetBSD >= 2.99.16, as the MPPE
definitions have been added to the kernel source around that time. No need to bump PKGREVISION, and no need to update to 0.0.5, the only change in that release is in code not used by this package.
Diffstat (limited to 'net/mppe-lkm')
-rw-r--r--net/mppe-lkm/distinfo4
-rw-r--r--net/mppe-lkm/patches/patch-aa65
2 files changed, 36 insertions, 33 deletions
diff --git a/net/mppe-lkm/distinfo b/net/mppe-lkm/distinfo
index 5e4a636472a..c0eb087a30d 100644
--- a/net/mppe-lkm/distinfo
+++ b/net/mppe-lkm/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.3 2005/02/24 12:13:53 agc Exp $
+$NetBSD: distinfo,v 1.4 2005/04/29 11:41:29 cube Exp $
SHA1 (kernel_ppp_mppe-0.0.4-src.tgz) = 37dc2487c760a78eb02585690bd6a1708d8dbaa2
RMD160 (kernel_ppp_mppe-0.0.4-src.tgz) = 37ebac9263da2cc5e90844d7cc823d0fbcb3baf4
Size (kernel_ppp_mppe-0.0.4-src.tgz) = 54194 bytes
-SHA1 (patch-aa) = e219f76184a5684dd19e8dac828a8bb8c2b51f17
+SHA1 (patch-aa) = 9b1571fe86611f09b0eba290649fd6b91c6cb961
diff --git a/net/mppe-lkm/patches/patch-aa b/net/mppe-lkm/patches/patch-aa
index fcb1aa9ba74..8d0b9a907cd 100644
--- a/net/mppe-lkm/patches/patch-aa
+++ b/net/mppe-lkm/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
+$NetBSD: patch-aa,v 1.3 2005/04/29 11:41:29 cube Exp $
--- ppp_mppe_compress.c.orig 2004-05-31 07:31:51.000000000 +0200
+++ ppp_mppe_compress.c
@@ -11,7 +11,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
*
* Permission to use, copy, modify, and distribute this software and its
* documentation is hereby granted, provided that the above copyright
-@@ -18,19 +20,32 @@
+@@ -18,19 +20,35 @@
* deprecated in 2.6
*/
@@ -28,25 +28,28 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
+#include <sys/systm.h>
+#include <sys/malloc.h>
+#include <sys/mbuf.h>
-
--#include <linux/ppp_defs.h>
--#include <linux/ppp-comp.h>
++
+#define PACKETPTR struct mbuf *
-
--#include "arcfour.h"
--#include "sha1.h"
++
+#include <net/ppp_defs.h>
+#include <net/ppp-comp.h>
+
+#include <sys/sha1.h>
+#include <crypto/arc4/arc4.h>
+
++#if __NetBSD_Version__ < 299001600
++/* MPPE definitions were included into the kernel source */
+#include "ppp-comp-local.h"
-+
++#endif
+
+-#include <linux/ppp_defs.h>
+-#include <linux/ppp-comp.h>
+int mppe_in_use;
+#define MOD_INC_USE_COUNT mppe_in_use++
+#define MOD_DEC_USE_COUNT mppe_in_use--
-+
+
+-#include "arcfour.h"
+-#include "sha1.h"
+#ifdef MPPE_DEBUG
+#define DPRINTF(x) aprint_normal x
+#else
@@ -55,7 +58,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
/*
* State for an MPPE (de)compressor.
-@@ -38,8 +53,8 @@
+@@ -38,8 +56,8 @@
typedef struct ppp_mppe_state {
unsigned char master_key[MPPE_MAX_KEY_LEN];
unsigned char session_key[MPPE_MAX_KEY_LEN];
@@ -66,7 +69,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
/* NB: 128-bit == 16, 40-bit == 8! */
/* If we want to support 56-bit, */
/* the unit has to change to bits */
-@@ -84,12 +99,12 @@ static int mppe_comp_init __P((void *sta
+@@ -84,12 +102,12 @@ static int mppe_comp_init __P((void *sta
static int mppe_decomp_init __P((void *state, unsigned char *options,
int optlen, int unit,
int hdrlen, int mru, int debug));
@@ -84,7 +87,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
static void mppe_comp_reset __P((void *state));
static void mppe_decomp_reset __P((void *state));
static void mppe_comp_stats __P((void *state, struct compstat *stats));
-@@ -104,7 +119,7 @@ GetNewKeyFromSHA(unsigned char *MasterKe
+@@ -104,7 +122,7 @@ GetNewKeyFromSHA(unsigned char *MasterKe
unsigned SessionKeyLength, unsigned char *InterimKey)
{
SHA1_CTX Context;
@@ -93,7 +96,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
unsigned char SHApad1[40] =
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-@@ -119,12 +134,12 @@ GetNewKeyFromSHA(unsigned char *MasterKe
+@@ -119,12 +137,12 @@ GetNewKeyFromSHA(unsigned char *MasterKe
/* assert(SessionKeyLength <= SHA1_SIGNATURE_SIZE); */
@@ -112,7 +115,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
memcpy(InterimKey, Digest, SessionKeyLength);
}
-@@ -141,9 +156,9 @@ mppe_rekey(ppp_mppe_state *state, int in
+@@ -141,9 +159,9 @@ mppe_rekey(ppp_mppe_state *state, int in
GetNewKeyFromSHA(state->master_key, state->session_key,
state->keylen, InterimKey);
if (!initial_key) {
@@ -125,7 +128,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
} else {
memcpy(state->session_key, InterimKey, state->keylen);
}
-@@ -153,7 +168,7 @@ mppe_rekey(ppp_mppe_state *state, int in
+@@ -153,7 +171,7 @@ mppe_rekey(ppp_mppe_state *state, int in
state->session_key[1] = 0x26;
state->session_key[2] = 0x9e;
}
@@ -134,7 +137,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
}
-@@ -170,15 +185,12 @@ mppe_alloc(unsigned char *options, int o
+@@ -170,15 +188,12 @@ mppe_alloc(unsigned char *options, int o
|| options[1] != CILEN_MPPE)
return NULL;
@@ -152,7 +155,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
memset(state, 0, sizeof(*state));
/* Save keys. */
-@@ -201,12 +213,10 @@ mppe_free(void *arg)
+@@ -201,12 +216,10 @@ mppe_free(void *arg)
ppp_mppe_state *state = (ppp_mppe_state *) arg;
if (state) {
@@ -168,7 +171,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
}
}
-@@ -232,12 +242,16 @@ mppe_init(void *arg, unsigned char *opti
+@@ -232,12 +245,16 @@ mppe_init(void *arg, unsigned char *opti
else if (mppe_opts & MPPE_OPT_40)
state->keylen = 8;
else {
@@ -186,7 +189,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
/* Generate the initial session key. */
mppe_rekey(state, 1);
-@@ -246,7 +260,7 @@ mppe_init(void *arg, unsigned char *opti
+@@ -246,7 +263,7 @@ mppe_init(void *arg, unsigned char *opti
char mkey[sizeof(state->master_key) * 2 + 1];
char skey[sizeof(state->session_key) * 2 + 1];
@@ -195,7 +198,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
unit, (state->keylen == 16)? 128: 40,
(state->stateful)? "stateful": "stateless");
-@@ -254,7 +268,7 @@ mppe_init(void *arg, unsigned char *opti
+@@ -254,7 +271,7 @@ mppe_init(void *arg, unsigned char *opti
sprintf(mkey + i * 2, "%.2x", state->master_key[i]);
for (i = 0; i < sizeof(state->session_key); i++)
sprintf(skey + i * 2, "%.2x", state->session_key[i]);
@@ -204,7 +207,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
debugstr, unit, mkey, skey);
}
-@@ -311,30 +325,75 @@ mppe_comp_reset(void *arg)
+@@ -311,30 +328,75 @@ mppe_comp_reset(void *arg)
* MPPE_OVHD + 2 bytes larger than the input.
*/
int
@@ -286,7 +289,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
/*
* Copy over the PPP header and set control bits.
*/
-@@ -346,7 +405,7 @@ mppe_compress(void *arg, unsigned char *
+@@ -346,7 +408,7 @@ mppe_compress(void *arg, unsigned char *
state->ccount = (state->ccount + 1) % MPPE_CCOUNT_SPACE;
if (state->debug >= 7)
@@ -295,7 +298,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
state->ccount);
obuf[0] = state->ccount >> 8;
obuf[1] = state->ccount & 0xff;
-@@ -356,19 +415,62 @@ mppe_compress(void *arg, unsigned char *
+@@ -356,19 +418,62 @@ mppe_compress(void *arg, unsigned char *
(state->bits & MPPE_BIT_FLUSHED)) { /* CCP Reset-Request */
/* We must rekey */
if (state->debug && state->stateful)
@@ -362,7 +365,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
state->stats.unc_bytes += isize;
state->stats.unc_packets++;
-@@ -413,56 +515,50 @@ mppe_decomp_reset(void *arg)
+@@ -413,56 +518,50 @@ mppe_decomp_reset(void *arg)
* Decompress (decrypt) an MPPE packet.
*/
int
@@ -439,7 +442,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
state->sanity_errors += 100;
sanity = 1;
}
-@@ -531,6 +627,46 @@ mppe_decompress(void *arg, unsigned char
+@@ -531,6 +630,46 @@ mppe_decompress(void *arg, unsigned char
mppe_rekey(state, 0);
}
@@ -486,7 +489,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
/*
* Fill in the first part of the PPP header. The protocol field
* comes from the decrypted data.
-@@ -538,15 +674,17 @@ mppe_decompress(void *arg, unsigned char
+@@ -538,15 +677,17 @@ mppe_decompress(void *arg, unsigned char
obuf[0] = PPP_ADDRESS(ibuf); /* +1 */
obuf[1] = PPP_CONTROL(ibuf); /* +1 */
obuf += 2;
@@ -505,7 +508,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
/*
* Do PFC decompression.
-@@ -557,13 +695,56 @@ mppe_decompress(void *arg, unsigned char
+@@ -557,13 +698,56 @@ mppe_decompress(void *arg, unsigned char
obuf[1] = obuf[0];
obuf[0] = 0;
obuf++;
@@ -566,7 +569,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
state->stats.unc_packets++;
state->stats.comp_bytes += isize;
state->stats.comp_packets++;
-@@ -571,7 +752,7 @@ mppe_decompress(void *arg, unsigned char
+@@ -571,7 +755,7 @@ mppe_decompress(void *arg, unsigned char
/* good packet credit */
state->sanity_errors >>= 1;
@@ -575,7 +578,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
}
/*
-@@ -581,29 +762,23 @@ mppe_decompress(void *arg, unsigned char
+@@ -581,29 +765,23 @@ mppe_decompress(void *arg, unsigned char
* packet. (How to do this?)
*/
static void
@@ -613,7 +616,7 @@ $NetBSD: patch-aa,v 1.2 2005/01/06 18:22:16 cube Exp $
/*
* Procedures exported to if_ppp.c.
*/
-@@ -623,34 +798,3 @@ struct compressor ppp_mppe = {
+@@ -623,34 +801,3 @@ struct compressor ppp_mppe = {
mppe_incomp, /* incomp */
mppe_comp_stats, /* decomp_stat */
};