Lines 66-72
Link Here
|
66 |
|
66 |
|
67 |
#if !defined(NETGRAPH_MPPC_COMPRESSION) && !defined(NETGRAPH_MPPC_ENCRYPTION) |
67 |
#if !defined(NETGRAPH_MPPC_COMPRESSION) && !defined(NETGRAPH_MPPC_ENCRYPTION) |
68 |
#ifdef KLD_MODULE |
68 |
#ifdef KLD_MODULE |
69 |
/* XXX NETGRAPH_MPPC_COMPRESSION isn't functional yet */ |
69 |
#define NETGRAPH_MPPC_COMPRESSION |
70 |
#define NETGRAPH_MPPC_ENCRYPTION |
70 |
#define NETGRAPH_MPPC_ENCRYPTION |
71 |
#else |
71 |
#else |
72 |
/* This case is indicative of an error in sys/conf files */ |
72 |
/* This case is indicative of an error in sys/conf files */ |
Lines 81-87
static MALLOC_DEFINE(M_NETGRAPH_MPPC, "n
Link Here
|
81 |
#endif |
81 |
#endif |
82 |
|
82 |
|
83 |
#ifdef NETGRAPH_MPPC_COMPRESSION |
83 |
#ifdef NETGRAPH_MPPC_COMPRESSION |
84 |
/* XXX this file doesn't exist yet, but hopefully someday it will... */ |
|
|
85 |
#include <net/mppc.h> |
84 |
#include <net/mppc.h> |
86 |
#endif |
85 |
#endif |
87 |
#ifdef NETGRAPH_MPPC_ENCRYPTION |
86 |
#ifdef NETGRAPH_MPPC_ENCRYPTION |
Lines 542-549
err1:
Link Here
|
542 |
rtn = MPPC_Compress(&source, &dest, &sourceCnt, |
541 |
rtn = MPPC_Compress(&source, &dest, &sourceCnt, |
543 |
&destCnt, d->history, flags, 0); |
542 |
&destCnt, d->history, flags, 0); |
544 |
|
543 |
|
545 |
/* Check return value */ |
|
|
546 |
KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __func__)); |
547 |
if ((rtn & MPPC_EXPANDED) == 0 |
544 |
if ((rtn & MPPC_EXPANDED) == 0 |
548 |
&& (rtn & MPPC_COMP_OK) == MPPC_COMP_OK) { |
545 |
&& (rtn & MPPC_COMP_OK) == MPPC_COMP_OK) { |
549 |
outlen -= destCnt; |
546 |
outlen -= destCnt; |
Lines 804-811
failed:
Link Here
|
804 |
rtn = MPPC_Decompress(&source, &dest, |
801 |
rtn = MPPC_Decompress(&source, &dest, |
805 |
&sourceCnt, &destCnt, d->history, flags); |
802 |
&sourceCnt, &destCnt, d->history, flags); |
806 |
|
803 |
|
807 |
/* Check return value */ |
|
|
808 |
KASSERT(rtn != MPPC_INVALID, ("%s: invalid", __func__)); |
809 |
if ((rtn & MPPC_DEST_EXHAUSTED) != 0 |
804 |
if ((rtn & MPPC_DEST_EXHAUSTED) != 0 |
810 |
|| (rtn & MPPC_DECOMP_OK) != MPPC_DECOMP_OK) { |
805 |
|| (rtn & MPPC_DECOMP_OK) != MPPC_DECOMP_OK) { |
811 |
log(LOG_ERR, "%s: decomp returned 0x%x", |
806 |
log(LOG_ERR, "%s: decomp returned 0x%x", |