jadonk / jadonk/rowboat

VPN failure on rowboat-android

Open
#131 0 comments 0 reactions 0 assignees View on GitHub
auto-migrated Priority-Medium Type-Defect
Dominant language
No language data
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

```
What steps will reproduce the problem?
1. connect to network via ethernet , wifi or gsrm
2. make sure you can ping the vpn router
3. make a pptp vpn connection

or run from console
mtpd pptp xx.xx.xx.xx 1723 "linkname vpn name xxxxx password xxxx" &

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)
I/mtpd (2343): Tunnel established
D/mtpd (2343): Received OCRQ (remote = 10255)
I/mtpd (2343): Session established
I/mtpd (2343): Creating PPPoX socket
F/mtpd (2343): Connect() Invalid argument

mtpd dies

What version of the product are you using? On what operating system?
rowboat-gingerbread 2.3.4 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,
```

Original issue reported on code.google.com by `markesse...@gmail.com` on 24 Oct 2011 at 6:06

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in external/mtpd/pptp.c, especially create_pppox() and the connect() call that fails with EINVAL after the PPTP session is established. Reproduce the connection using the listed mtpd command and inspect the logcat sequence. Done means the PPPoX connection succeeds instead of mtpd exiting with "Connect() Invalid argument".

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.