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

vpnc(musl version) cannot connect #26798

Closed
rwx-754 opened this issue Nov 29, 2020 · 14 comments · Fixed by #28320
Closed

vpnc(musl version) cannot connect #26798

rwx-754 opened this issue Nov 29, 2020 · 14 comments · Fixed by #28320
Assignees
Labels
bug Something isn't working

Comments

@rwx-754
Copy link

rwx-754 commented Nov 29, 2020

System: x86_64 (musl version)
Package: vpnc version 0.5.3

vpnc cannot connect:
When run it says: "can't initialise tunnel interface: No such file or directory".
/dev/net/tun present in system, but vpnc try find /dev/tun0-254 devices

@ericonr
Copy link
Member

ericonr commented Jan 20, 2021

Is this still an issue?

@ericonr ericonr added the bug Something isn't working label Jan 20, 2021
@rwx-754
Copy link
Author

rwx-754 commented Jan 21, 2021

Yes. This issue still present.

@Gottox
Copy link
Member

Gottox commented Jan 21, 2021

I'm currently lacking a cisco endpoint where I can verify this behavior.

@rwx-754
Copy link
Author

rwx-754 commented Jan 21, 2021

No need cisco endpoint for verify:
1.install vpnc

2.set config to:
IPSec gateway 127.0.0.1
IPSec ID test
IPSec secret test
#IKE Authmode hybrid
Xauth username test
Xauth password test

3.and just run: vpnc or strace vpnc

@rwx-754
Copy link
Author

rwx-754 commented Jan 21, 2021

And You will see the following:
...
wait4(9377, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 9377
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f63baccfa1e}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f63baccfa1e}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=9377, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
open("/dev/tun0", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
open("/dev/tun1", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
open("/dev/tun2", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
open("/dev/tun3", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
open("/dev/tun4", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
open("/dev/tun5", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
open("/dev/tun6", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
open("/dev/tun7", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
open("/dev/tun8", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
...
open("/dev/tun253", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
open("/dev/tun254", O_RDWR) = -1 ENOENT (Нет такого файла или каталога)
writev(2, [{iov_base="", iov_len=0}, {iov_base="can't initialise tunnel interfac"..., iov_len=33}], 2can't initialise tunnel interface) = 33
writev(2, [{iov_base=": No such file or directory\n", iov_len=28}, {iov_base=NULL, iov_len=0}], 2: No such file or directory
) = 28
exit_group(1) = ?
+++ exited with 1 +++

@Gottox
Copy link
Member

Gottox commented Jan 21, 2021

Okay, let's try that.

@Gottox
Copy link
Member

Gottox commented Jan 29, 2021

I have an idea what's happening. Dang.

@Gottox
Copy link
Member

Gottox commented Jan 29, 2021

@void-linux/pkg-committers Okay, we need to discuss this. vpnc is basicly foobar on musl. There's a fork of vpnc here. This fork is used by alpine for example.

Unfortunately, parts of the build (vpnc-script) is only accessibly from a git-only repository and not part of vpnc itself anymore.

Should we switch to the new upstream? There are no releases yet. Also the template will become messy as we need to git-clone the vpnc-script repository.

@ericonr
Copy link
Member

ericonr commented Jan 29, 2021

We don't need to clone, github allows us to pull a specific commit as an archive.

@ericonr
Copy link
Member

ericonr commented Jan 29, 2021

In https://davidepucci.it/doc/vpnc/ , it mentions that the repository isn't for active development, but mostly for security and bug fixes (and new features others implement, but idk how common those are). In any case, if we switch to it, which seems reasonable, I'd suggest updating to the git tip whenever it gets security fixes.

@Gottox
Copy link
Member

Gottox commented Jan 29, 2021

@ericonr The repository I was speaking of is not on github and does not allow downloading tarballs: https://git.infradead.org/users/dwmw2/vpnc-scripts.git/

@Gottox
Copy link
Member

Gottox commented Jan 29, 2021

@ericonr Yea, it's still better than our current upstream as the last release was >10y ago.

@ahesford
Copy link
Member

ahesford commented Jan 29, 2021

This seems to work for a snapshot of a specific hash:

https://git.infradead.org/users/dwmw2/vpnc-scripts.git/snapshot/<hash>.tar.gz

Gottox added a commit to Gottox/void-packages that referenced this issue Jan 30, 2021
Gottox added a commit to Gottox/void-packages that referenced this issue Jan 30, 2021
fixes void-linux#26798.

* Changes upstream to https://github.com/streambinder/vpnc/. That's a fork
  that's a fork which is at least used in alpine.
* Depends on vpnc-scripts. New upstream doesn't ship those files anymore
* Add wrapper script to stay backwards compatible
Gottox added a commit to Gottox/void-packages that referenced this issue Jan 30, 2021
fixes void-linux#26798.

* Changes upstream to https://github.com/streambinder/vpnc/. That's a fork
  that's a fork which is at least used in alpine.
* Depends on vpnc-scripts. New upstream doesn't ship those files anymore
* Add wrapper script to stay backwards compatible
* Switch to build_style=gnu-makefile instead of manually calling make.
Gottox added a commit to Gottox/void-packages that referenced this issue Jan 31, 2021
fixes void-linux#26798.

* Changes upstream to https://github.com/streambinder/vpnc/. That's a fork
  that's a fork which is at least used in alpine.
* Depends on vpnc-scripts. New upstream doesn't ship those files anymore
* Add wrapper script to stay backwards compatible
* Switch to build_style=gnu-makefile instead of manually calling make.
Gottox added a commit to Gottox/void-packages that referenced this issue Jan 31, 2021
fixes void-linux#26798.

* Changes upstream to https://github.com/streambinder/vpnc/. That's a fork
  that's a fork which is at least used in alpine.
* Depends on vpnc-scripts. New upstream doesn't ship those files anymore
* Add wrapper script to stay backwards compatible
* Switch to build_style=gnu-makefile instead of manually calling make.
Gottox added a commit to Gottox/void-packages that referenced this issue Jan 31, 2021
fixes void-linux#26798.

* Changes upstream to https://github.com/streambinder/vpnc/. That's a fork
  that's a fork which is at least used in alpine.
* Depends on vpnc-scripts. New upstream doesn't ship those files anymore
* Add wrapper script to stay backwards compatible
* Switch to build_style=gnu-makefile instead of manually calling make.
Gottox added a commit that referenced this issue Feb 1, 2021
fixes #26798.

* Changes upstream to https://github.com/streambinder/vpnc/. That's a fork
  that's a fork which is at least used in alpine.
* Depends on vpnc-scripts. New upstream doesn't ship those files anymore
* Add wrapper script to stay backwards compatible
* Switch to build_style=gnu-makefile instead of manually calling make.
uw2021 pushed a commit to uw2021/void-packages that referenced this issue Feb 4, 2021
fixes void-linux#26798.

* Changes upstream to https://github.com/streambinder/vpnc/. That's a fork
  that's a fork which is at least used in alpine.
* Depends on vpnc-scripts. New upstream doesn't ship those files anymore
* Add wrapper script to stay backwards compatible
* Switch to build_style=gnu-makefile instead of manually calling make.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants