Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support TUN tunnel instead of using pppd #818

Closed

Conversation

DimitriPapadopoulos
Copy link
Collaborator

@DimitriPapadopoulos DimitriPapadopoulos commented Dec 18, 2020

From #801 (comment):

we simulated the PPP negotiation procedure. There are 3 stages in PPP protocal.

  • The 1th stage is LCP. client will send Magic-Number and MRU request to fortivpn server, then will ack the server request. server will send the Magic-Number and ack the client request.
  • The 2th stage is IPCP. both will will send the IPCP config-request to other. client need to send the IPCP config-request Option (3) with the IP which come from the XML. then both config-request need to be ack.
  • The 3th stage is 0x0021. we can read and write IP packet from tun NIC. then sending data by encapsulating or decapsulating the IP packet with header 0x0021(2 Bytes) + (totolsize(2 Bytes) + 0x5050 + pppsize(2 Bytes)).
    we also need send the LCP echo-request to fortinet VPN to keep the TCP connection wouldn't close.


if (optlist && optlist->head) {
uint8_t *packet = (uint8_t *)optlist->head;
struct ipcp_header *header = ((struct ipcp_header *)packet) - 1;

Check failure

Code scanning / CodeQL

Suspicious pointer scaling

This pointer might have type [conf_option](1) (size 2), but this pointer arithmetic is done with type ipcp_header * (size 4).

if (optlist && optlist->head) {
uint8_t *head = (uint8_t *)optlist->head;
struct lcp_header *header = ((struct lcp_header *)head) - 1;

Check failure

Code scanning / CodeQL

Suspicious pointer scaling

This pointer might have type [conf_option](1) (size 2), but this pointer arithmetic is done with type lcp_header * (size 4).
@DimitriPapadopoulos DimitriPapadopoulos changed the title Tun Support TUN tunnel instead of pppd Dec 10, 2022
@DimitriPapadopoulos DimitriPapadopoulos changed the title Support TUN tunnel instead of pppd Support TUN tunnel instead of using pppd Dec 10, 2022
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review December 10, 2022 14:31
@DimitriPapadopoulos
Copy link
Collaborator Author

Re-opened as #1048.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant