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

"could not set route to tunnel gw" error in Ubuntu 16.04 #55

Closed
jjamor opened this issue May 14, 2016 · 4 comments
Closed

"could not set route to tunnel gw" error in Ubuntu 16.04 #55

jjamor opened this issue May 14, 2016 · 4 comments

Comments

@jjamor
Copy link

jjamor commented May 14, 2016

Hello,

I recently upgraded to Ubuntu 16.04. Since that upgrade, I cannot connect using openfortivpn because:

DEBUG:  ip route add to 0.0.0.0/106.127.0.0 dev ppp0
WARN:   Could not set route to tunnel gateway (Address family not supported by protocol).

May be linux version (4.4.0)?

Could you help us?

Thanks!

@adrienverge
Copy link
Owner

Hi,

I don't have access to a Fortinet VPN anymore so I can't help you here.

Any help from anyone is welcome!

@mata-p
Copy link

mata-p commented May 20, 2016

I noticed the same, I think the cause is that here tunnel.ipv4.split_routes is not inizialized to 0.
Another manifestation of the same I noticed was a buffer overflow which crashed the program here

char env_var[21];
// ...
sprintf(env_var, "VPN_ROUTE_DEST_%d", tunnel->ipv4.split_routes);

because the value was too big to fit into env_var. Initializing the variable to 0 fixes that.
To be safe I blanketed the whole struct before using it with

memset(&tunnel, 0, sizeof(tunnel));

@jjamor
Copy link
Author

jjamor commented May 20, 2016

Hi @mata-p , many thanks!

I just tested your change, and it works!

Can you generate a pull request?

Thanks!

@adrienverge
Copy link
Owner

I just pushed a fix to master, many thanks to @mata-p for finding the cause!

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

No branches or pull requests

3 participants