rahra / onioncat

Official repository of OnionCat, the VPN adapter for Tor and I2P.
https://www.onioncat.org/
GNU General Public License v3.0
228 stars 29 forks source link

Command line option to set tun device name #2

Closed Shulyaka closed 6 years ago

Shulyaka commented 6 years ago

The reason behind this functionality is to allow a user to chose a certain device name to be able to assign a correct firewall zone. This way the user first configures a network interface and firewall, and then runs ocat with this new parameter to match the network interface configuration.

Signed-off-by: Denis Shulyaka shulyaka@gmail.com

rahra commented 6 years ago

Please replace strncpy() with strlcpy() otherwise tunname will be unterminated if you pass an argument with a string length of more than sizeof(tunname).

Shulyaka commented 6 years ago

You are right. Done.