Re: [PATCH 0/7] Allow changing the transit namespace

2018-09-08 Thread Julian Orth

On 9/8/18 3:39 PM, Bruno Wolff III wrote:

On Sat, Sep 08, 2018 at 14:18:34 +0200,
  Julian Orth  wrote:


wg set  transit-net 

The distinction is made based on the format of the argument. If it is an
unsigned 32 bit integer, then it is interpreted as a process id.
Otherwise it is interpreted as a file path. /proc does not need to be
mounted to use the process id interpretation. To force the
interpretation as a file-path, use a ./ prefix.


Ambiguity is generally not a good idea (especially for security 
applications). It's not my decision, but I'd rather see the syntax make 
it clear what the type of the parameter is supposed to be.


The syntax is based on a similar feature in iproute2:

ip link set  netns 

The syntax of wg seems to generally follow the iproute2 syntax so I 
tried to keep it consistent.

___
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard


Re: [PATCH 0/7] Allow changing the transit namespace

2018-09-08 Thread Bruno Wolff III

On Sat, Sep 08, 2018 at 14:18:34 +0200,
 Julian Orth  wrote:


wg set  transit-net 

The distinction is made based on the format of the argument. If it is an
unsigned 32 bit integer, then it is interpreted as a process id.
Otherwise it is interpreted as a file path. /proc does not need to be
mounted to use the process id interpretation. To force the
interpretation as a file-path, use a ./ prefix.


Ambiguity is generally not a good idea (especially for security applications). 
It's not my decision, but I'd rather see the syntax make it clear what the type 
of the parameter is supposed to be.

___
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard