From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: ju.orth@gmail.com Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id ef304a21 for ; Sat, 8 Sep 2018 13:49:15 +0000 (UTC) Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 9959c331 for ; Sat, 8 Sep 2018 13:49:15 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id b19-v6so17251660wme.3 for ; Sat, 08 Sep 2018 06:49:44 -0700 (PDT) Return-Path: Subject: Re: [PATCH 0/7] Allow changing the transit namespace To: Bruno Wolff III References: <20180908121841.8372-1-ju.orth@gmail.com> <20180908133906.GA20780@wolff.to> From: Julian Orth Message-ID: Date: Sat, 8 Sep 2018 15:49:41 +0200 MIME-Version: 1.0 In-Reply-To: <20180908133906.GA20780@wolff.to> Content-Type: text/plain; charset=utf-8; format=flowed Cc: wireguard@lists.zx2c4.com List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.