What steps will reproduce the problem?
1. Add to kernel build (CONFIG_PPP, CONFIG_PPP_ASYNC, CONFIG_PPP_SYNC,
CONFIG_PPP_DEFLATE, CONFIG_PPP_BSDCOMP, CONFIG_PPP_MPPE, CONFIG_PPPOLAC
CONFIG_PPPOPNS, CONFIG_INET_AH, CONFIG_INET_ESP, CONFIG_INET_IPCOMP,
CONFIG_INET_XFRM_MODE_TRANSPORT, CONFIG_INET_XFRM_MODE_TUNNEL,
CONFIG_INET_XFRM_MODE_BEET)
2. Build Kernel / Android
3. Place on SD card and Boot Android
4. Enable Ethernet, and setprop net.dns1 = xx.xx.xx.xx
5. Test network connection. ping www.xyz.com. (make sure ethernet / dns / routes work)
6. make sure you can ping the vpn router
3. make a pptp vpn connection in (settings / wirless / vpn) in android gui
or run from console
(mtpd pptp xx.xx.xx.xx 1723 "linkname vpn name xxxxx password xxxx refuse_eap nodefaultroute usepeerdns idle 1800 mtu 1300 mru 1300" &) with out mppe
(mtpd pptp xx.xx.xx.xx 1723 "linkname vpn name xxxxx password xxxx refuse_eap nodefaultroute usepeerdns idle 1800 mtu 1300 mru 1300 +mppe" &) with mppe
What is the expected output? What do you see instead?
should see a connection made
running logcat we see
I/mtpd (2343): Using protocol pptp
I/mtpd (2343): Connecting 192.168.220.238 port 1723
I/mtpd (2343): Connection established (socket = 10)
D/mtpd (2343): Sending SCCRQ
D/mtpd (2343): Received SCCRP -> Sending OCRQ (local = 12339) -- Here we see that the SCCRP is received line 290 in pptp.c
I/mtpd (2343): Tunnel established
D/mtpd (2343): Received OCRQ (remote = 10255)
I/mtpd (2343): Session established
I/mtpd (2343): Creating PPPoX socket -- mtpd.c calling pptp.c create_pppox line 237
F/mtpd (2343): Connect() Invalid argument -- pptp.c line 252
mtpd dies
pptp.c -- create_pppox starting at line 251
if (connect(pppox, (struct sockaddr *)&address, sizeof(address)) != 0) {
log_print(FATAL, "Connect() %s", strerror(errno));
exit(SYSTEM_ERROR);
}
sterror(errno) is returning Invalid argument
system exits with error and mtpd terminates
(sizeof(address)) is returning = 14
What version of the product are you using? On what operating system?
TI-Android-Gingerbread- 2.3.4-DevKit2.1 Latest GIT Sunday 10/24/2011
Please provide any additional information below.
Added code to pptp.c in external/mtpd
to display sizeof(address)
size of address returned from connect(pppox,
is = 14.
code below
static int create_pppox()
{
int pppox;
log_print(INFO, "Creating PPPoX socket");
pppox = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OPNS);
if (pppox == -1) {
log_print(FATAL, "Socket() %s", strerror(errno));
exit(SYSTEM_ERROR);
} else {
struct sockaddr_pppopns address = {
.sa_family = AF_PPPOX,
.sa_protocol = PX_PROTO_OPNS,
.tcp_socket = the_socket,
.local = local,
.remote = remote,
};
if (connect(pppox, (struct sockaddr *)&address, sizeof(address)) != 0) {
log_print(FATAL, "Connect() %s", strerror(errno));
log_print(FATAL, "CONNECT address size %d", sizeof(address);
exit(SYSTEM_ERROR);
}
}
return pppox;
}
Looks like a problem in connect(pppox,
VPN routers tried are MikroTik 5.4, MS Windows 2003, MS Windows 2008, Dlink