All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.4.2 and 2.4.3 fail to test that kernel has MPPE support
@ 2005-01-06 11:46 Anton Voronin
  0 siblings, 0 replies; only message in thread
From: Anton Voronin @ 2005-01-06 11:46 UTC (permalink / raw)
  To: linux-ppp

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-06 11:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-06 11:46 2.4.2 and 2.4.3 fail to test that kernel has MPPE support Anton Voronin

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.