Re: [RFC PATCH v2 2/2] platform: add support for WireGuard links

2018-05-21 Thread Javier Arteaga
Hi Jason, On Mon, May 21, 2018 at 05:04:25PM +0200, Jason A. Donenfeld wrote: > So what's the status of this patch set? Life got in the way and I parked this one. I should be able to pick it up again next week though :) ___ networkmanager-list mailing

[RFC PATCH v3 3/3] platform: add support for WireGuard links

2018-06-17 Thread Javier Arteaga
Add support for a new wireguard link type to the platform code. For now this only covers querying existing links via genetlink and parsing them into platform objects. --- Notes: Changes in v2->v3: * Changed peers/allowedips from CList to arrays-of-structs (GArray wrappers are

[RFC PATCH v3 2/3] platform-linux: open a genl socket

2018-06-17 Thread Javier Arteaga
Open another socket to speak Generic Netlink. This is aimed towards adding WireGuard support, which requires genl. --- src/platform/nm-linux-platform.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index

[RFC PATCH v3 1/3] platform-linux: add support function for genl

2018-06-17 Thread Javier Arteaga
Resolves Generic Netlink family ID by name. --- src/platform/nm-linux-platform.c | 12 1 file changed, 12 insertions(+) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 9bd662a18..b6537d5cb 100644 --- a/src/platform/nm-linux-platform.c +++

[RFC PATCH v3 0/3] platform: add WireGuard support

2018-06-17 Thread Javier Arteaga
to this for quite a while. Hoping to keep patches coming more steadily now.) As before, this patchset only implements querying and parsing of existing WireGuard interfaces via genetlink. If we're on the right track now, I'll move onto link_wireguard_add, NMDeviceWireguard, etc. Javier Arteaga (3

Re: [RFC PATCH 0/2] platform: add WireGuard support

2018-03-14 Thread Javier Arteaga
On Wed, Mar 14, 2018 at 2:21 AM, Jason A. Donenfeld wrote: > Hey Javier, > > Thanks for getting this rolling. Very exciting. Unfortunately, I'm in > traveling through Chile right now with somewhat limited connectivity, > so I won't be able to give this the review it deserves

Re: [RFC PATCH 1/2] platform: move genl_ctrl_resolve to nm-netlink.c

2018-03-14 Thread Javier Arteaga
On Wed, Mar 14, 2018 at 11:35 AM, Thomas Haller wrote: > Hi, > >> -out: >> - if (result >= 0) >> - _LOGD (LOGD_WIFI, "genl_ctrl_resolve: resolved >> \"%s\" as 0x%x", name, result); >> - else >> - _LOGE (LOGD_WIFI, "genl_ctrl_resolve: failed

Re: [RFC PATCH 2/2] platform: add support for WireGuard links

2018-03-14 Thread Javier Arteaga
Hi Thomas, Thanks a lot for your feedback! Comments inline. On Wed, Mar 14, 2018 at 3:15 PM, Thomas Haller wrote: [...] >> + NMP_OBJECT_TYPE_LNK_WIREGUARD, >> + >> + NMP_OBJECT_TYPE_WIREGUARD_PEER, >> + NMP_OBJECT_TYPE_WIREGUARD_ALLOWEDIP, > > You ask whether

[RFC PATCH 2/2] platform: add support for WireGuard links

2018-03-13 Thread Javier Arteaga
Add support for a new wireguard link type to the platform code. For now this only covers querying existing links via Generic Netlink and parsing them into platform objects. --- src/nm-types.h | 5 + src/platform/nm-linux-platform.c | 250 +++

[RFC PATCH 0/2] platform: add WireGuard support

2018-03-13 Thread Javier Arteaga
-wireguard/ [1] Link: https://mail.gnome.org/archives/networkmanager-list/2018-February/msg00017.html [2] Javier Arteaga (2): platform: move genl_ctrl_resolve to nm-netlink.c platform: add support for WireGuard links src/nm-types.h | 5 + src/platform/nm-linux-platform.c

[RFC PATCH 1/2] platform: move genl_ctrl_resolve to nm-netlink.c

2018-03-13 Thread Javier Arteaga
Move genl_ctrl_resolve out of the wifi code so it can be reused by other interfaces based on genetlink. --- src/platform/nm-netlink.c | 68 + src/platform/nm-netlink.h | 32 +++--- src/platform/wifi/wifi-utils-nl80211.c | 80

Re: [RFC PATCH v2 2/2] platform: add support for WireGuard links

2018-04-04 Thread Javier Arteaga
Hi Thomas, On Tue, Apr 03, 2018 at 09:17:05PM +0200, Thomas Haller wrote: > Hi, > > it looks quite good!! :) > thanks Much appreciated! Your review comments have been very helpful. > > diff --git a/libnm-core/nm-core-types-internal.h b/libnm-core/nm- > > core-types-internal.h > > index

[RFC PATCH v2 2/2] platform: add support for WireGuard links

2018-03-29 Thread Javier Arteaga
Add support for a new wireguard link type to the platform code. For now this only covers querying existing links via Generic Netlink and parsing them into platform objects. [TODO: detect wireguard interface changes and invalidate nmp cache] --- libnm-core/nm-core-types-internal.h | 31

[RFC PATCH v2 0/2] platform: add WireGuard support

2018-03-29 Thread Javier Arteaga
Open issues: * There's no mechanism to invalidate the link info cache yet (need to ask Jason how to go about this when he's back) * Throwing "c-list.h" in "nm-core-types-internal.h" feels wrong :/ * No tests yet Javier Arteaga (2): platform: move genl_ctrl_resolve to nm-

[RFC PATCH v2 1/2] platform: move genl_ctrl_resolve to nm-netlink.c

2018-03-29 Thread Javier Arteaga
Move genl_ctrl_resolve out of the wifi code so it can be reused by other interfaces based on genetlink. --- src/platform/nm-netlink.c | 68 +++ src/platform/nm-netlink.h | 32 +++-- src/platform/wifi/wifi-utils-nl80211.c | 84

Re: [RFC PATCH v3 3/3] platform: add support for WireGuard links

2018-06-20 Thread Javier Arteaga via networkmanager-list
Hi Beniamino, Thanks for your review! On Wed, Jun 20, 2018 at 10:39:00AM +0200, Beniamino Galvani wrote: > > +typedef struct { > > + NMIPAddr ip; > > + guint8 family; > > + guint8 cidr; > > Just a nitpick, feel free to ignore, but perhaps 'mask' would be a > better name than 'cidr'.

Re: [PATCH v4 0/3] platform: add WireGuard support

2018-06-20 Thread Javier Arteaga via networkmanager-list
As discussed on IRC, I'll PR these from now on: https://github.com/NetworkManager/NetworkManager/pull/143 Apologies for the spam. On Wed, Jun 20, 2018 at 10:49:36AM +0100, Javier Arteaga wrote: > Hi all, > > Just a quick v4 addressing Beniamino's comments on v3. > See patch 3/3

[PATCH v4 3/3] platform: add support for WireGuard links

2018-06-20 Thread Javier Arteaga via networkmanager-list
Add support for a new wireguard link type to the platform code. For now this only covers querying existing links via genetlink and parsing them into platform objects. --- Notes: Changes in v3->v4: * Fixed using nm_hash_update_vals to hash array members * Removed initial one-shot

[PATCH v4 2/3] platform-linux: open a genl socket

2018-06-20 Thread Javier Arteaga via networkmanager-list
Open another socket to speak Generic Netlink. This is aimed towards adding WireGuard support, which requires genl. --- src/platform/nm-linux-platform.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index

[PATCH v4 0/3] platform: add WireGuard support

2018-06-20 Thread Javier Arteaga via networkmanager-list
Hi all, Just a quick v4 addressing Beniamino's comments on v3. See patch 3/3 for details. Javier Arteaga (3): platform-linux: add support function for genl platform-linux: open a genl socket platform: add support for WireGuard links libnm-core/nm-core-types-internal.h | 25 +++ src/nm

[PATCH v4 1/3] platform-linux: add support function for genl

2018-06-20 Thread Javier Arteaga via networkmanager-list
Resolves Generic Netlink family ID by name. --- src/platform/nm-linux-platform.c | 12 1 file changed, 12 insertions(+) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 9bd662a18..b6537d5cb 100644 --- a/src/platform/nm-linux-platform.c +++