Google Groups

Re: PPTP VPN FAILURES


William Esser Nov 10, 2011 12:11 PM
Posted in group: Android-x86
Yes,

The header loaded in during the linux build kernel/include/linux/
if_pppox.h has the following
defines
/
************************************************************************
 * Protocols supported by AF_PPPOX
 */
#define PX_PROTO_OE    0 /* Currently just PPPoE */
#define PX_PROTO_OL2TP 1 /* Now L2TP also */
#define PX_PROTO_PPTP  2
#define PX_PROTO_OLAC  3
#define PX_PROTO_OPNS  4
#define PX_MAX_PROTO   5
*****************************************************

in bionic/libc/kernel/common/if_pppolac.h
#define PX_PROTO_OLAC 2

in bionic/libc/kernel/common/if_pppopns.h
#define PX_PROTO_OPNS 3

when using connect(PPPOX, call in pptp.c in external/mtpd
for pptp it sends a PX_PROTO_OPNS = 2 (but pppox should send a 4)
and returns a INVALID PARAMETER error

when using connect(PPPOX, call in l2tp.c in external/mtpd
for l2tp it sends a PX_PROTO_OLAC = 2 (but pppox should send a 3)

-----------------------------

On Nov 7, 5:50 pm, Chih-Wei Huang <cwhu...@android-x86.org> wrote:
> Thank you for the patch.
> But could you explain more about what mismatched?
> I didn't see PX_PROTO_OLAC or PX_PROTO_OPNS
> defined in external/mtpd/* ?
>
> Besides, please consider to submit the patch to Google
> if it's a bug of the bionic.
>
> 2011/11/7 William Esser <markesser...@gmail.com>:
>
>
>
> > There is an error in the system during the connect(pppox) call in the
> > pptp.c under /external/mtpd
> > there is a *.h def mis match here in the bionic/libc/kernel/common/
> > linux files if_pppolac.h and if_pppopns.h
>
> > patch follows
>
> > diff --git a/libc/kernel/common/linux/if_pppolac.h b/libc/kernel/
> > common/linux/if_pppolac.h
> > index bf6eba0..f3c8bb1 100644
> > --- a/libc/kernel/common/linux/if_pppolac.h
> > +++ b/libc/kernel/common/linux/if_pppolac.h
> > @@ -15,7 +15,8 @@
> >  #include <linux/socket.h>
> >  #include <linux/types.h>
>
> > -#define PX_PROTO_OLAC 2
> > +/* was 2 */
> > +#define PX_PROTO_OLAC 3
>
> >  struct sockaddr_pppolac {
> >  sa_family_t sa_family;
>
> > diff --git a/libc/kernel/common/linux/if_pppopns.h b/libc/kernel/
> > common/linux/if_pppopns.h
> > index ac75210..106b4d1 100644
> > --- a/libc/kernel/common/linux/if_pppopns.h
> > +++ b/libc/kernel/common/linux/if_pppopns.h
> > @@ -15,7 +15,8 @@
> >  #include <linux/socket.h>
> >  #include <linux/types.h>
>
> > -#define PX_PROTO_OPNS 3
> > +/* was 3 */
> > +#define PX_PROTO_OPNS 4
>
> >  struct sockaddr_pppopns {
> >  sa_family_t sa_family;
>
> --
> Chih-Wei
> Android-x86 projecthttp://www.android-x86.org