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

vpn backend: tun interface addresses are incorrect on Darwin #599

Open
scareything opened this issue Apr 17, 2024 · 0 comments
Open

vpn backend: tun interface addresses are incorrect on Darwin #599

scareything opened this issue Apr 17, 2024 · 0 comments

Comments

@scareything
Copy link
Member

The inet and inet6 address assignments on Darwin are incorrect.

  1. The mask on the inet address is incorrect. for example, the command that vnet runs:

     ifconfig utun5 inet 10.122.0.1 10.122.0.1 up
    

    doesn't specify a mask at all, so you get the default mask for the address class - in this case 255.0.0.0 - regardless of the intended subnet size

     utun5: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
         inet 10.122.0.1 --> 10.122.0.1 netmask 0xff000000
    

    The mask can be specified with the source address in the ifconfig command:

     ifconfig utun5 inet 10.122.0.1/16 10.122.0.1 up
    
     utun5: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
             inet 10.122.0.1 --> 10.122.0.1 netmask 0xffff000000
    
  2. The inet6 address is not being added at all. It's easy to miss because it's logged as an INFO message, but zrok logs an error:

     2024/04/17 13:55:14.304	INFO	exec ifconfig [utun5 inet6 fd00:7a72:6f6b::1 fd00:7a72:6f6b::1 up]
     2024/04/17 13:55:14.315	INFO	failed to exec cmd: exit status 1
    
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

1 participant