From: Anton Voronin <anton@chelcom.ru>
To: linux-ppp@vger.kernel.org
Subject: 2.4.2 and 2.4.3 fail to test that kernel has MPPE support
Date: Thu, 06 Jan 2005 11:46:46 +0000 [thread overview]
Message-ID: <200501061646.46789.anton@chelcom.ru> (raw)
Hi everyone,
I've got a problem with pppd-2.4.2 and 2.4.3 using MPPE with 2.4.x kernel.
The ccp_test() function from sys-linux.c returns -1, however kernel has MPPE
support (ppp_mppe module gets loaded). With pppd-2.4.1, however, it works
fine. While ccp_test() seems to be identical between versions 2.4.1 and
2.4.2/2.4.3 of pppd, I noticed difference in the opt_buf argument supplied to
ccp_test():
pppd-2.4.1:
===================
if(p[5] & MPPE_40BIT) {
keysize = 8;
BCOPY(mppe_master_send_key_40, opt_buf+3, keysize);
BCOPY(mppe_master_recv_key_40, opt_buf+11, keysize);
} else if(p[5] & MPPE_128BIT) {
keysize = 16;
BCOPY(mppe_master_send_key_128, opt_buf+3, keysize);
BCOPY(mppe_master_recv_key_128, opt_buf+19, keysize);
}
if(p[5] != 0) {
opt_buf[0]=CI_MPPE;
opt_buf[1]=CILEN_MPPE;
opt_buf[2] = (go->mppe_stateless) ? 1 : 0;
res = ccp_test(f->unit, opt_buf, (2*keysize)+3, 0);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
} else {
res = -1;
}
===================
pppd-2.4.2/2.4.3:
===================
if (go->mppe) {
opt_buf[0] = CI_MPPE;
opt_buf[1] = CILEN_MPPE;
MPPE_OPTS_TO_CI(go->mppe, &opt_buf[2]);
/* Key material unimportant here. */
if (ccp_test(f->unit, opt_buf, CILEN_MPPE + MPPE_MAX_KEY_LEN, 0) <= 0)
{
error("MPPE required, but kernel has no support.");
lcp_close(f->unit, "MPPE required but not available");
}
}
===================
In both cases opt_buf[0] and opt_buf[1] are filled identically.
However, in 2.4.1 only opt_buf[2] if filled, and then two keys are copied,
while in 2.4.2/2.4.3 MPPE_OPTS_TO_CI() macro fills 4 more bytes of opt_buf (6
bytes total), and none of the keys are copied behind them. But, the 3rd
argument (option length) is set to CILEN_MPPE + MPPE_MAX_KEY_LEN (whilch is
equal to 6 + 16 = 22). Seems like the rest 16 bytes are left uninitialized
(even not zeroes, just contain garbage).
Is it a bug or I am using the wrong kernel patches, that behave differently?
The file of patches I am using was called:
linux-2.4.20-openssl-0.9.6b-mppe.patch
Should this be something else?
Best regards,
--
Anton Voronin
Intersvyaz JSC
http://www.chelcom.ru
+7 (3512) 655199
reply other threads:[~2005-01-06 11:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200501061646.46789.anton@chelcom.ru \
--to=anton@chelcom.ru \
--cc=linux-ppp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.