PPP, MSCHAP, CCP, MPPE: reworked key passing from CCP to MPPE

Removed mutiple copies of keys by pre-setting MPPE keys during MSCHAP
negotiation.

Improved MPPE init so we don't need to pass a buffer formatted in a
special way to MPPE, this is necessary for pppd to talk to the kernel,
we don't need that here.
This commit is contained in:
Sylvain Rochet
2015-04-19 01:20:43 +02:00
parent 045f44c7f9
commit fc7e327d19
5 changed files with 25 additions and 48 deletions

View File

@@ -169,8 +169,8 @@ typedef struct ppp_mppe_state {
u8_t unit;
} ppp_mppe_state;
int mppe_init(ppp_mppe_state *state, unsigned char *options, int optlen,
u8_t unit, u8_t debug, const char *debugstr);
void mppe_set_key(ppp_mppe_state *state, u8_t *key);
void mppe_init(ppp_mppe_state *state, u8_t options, u8_t unit, u8_t debug, const char *debugstr);
void mppe_comp_reset(ppp_mppe_state *state);
err_t mppe_compress(ppp_mppe_state *state, struct pbuf **pb, u16_t protocol);
void mppe_decomp_reset(ppp_mppe_state *state);

View File

@@ -423,8 +423,6 @@ struct ppp_pcb_s {
#if MPPE_SUPPORT
ppp_mppe_state mppe_comp; /* MPPE "compressor" structure */
ppp_mppe_state mppe_decomp; /* MPPE "decompressor" structure */
u8_t mppe_send_key[MPPE_MAX_KEY_LEN];
u8_t mppe_recv_key[MPPE_MAX_KEY_LEN];
#endif /* MPPE_SUPPORT */
#endif /* CCP_SUPPORT */