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

Hi all,

Here's a v2 of the WireGuard integration for the platform layer.
It addresses comments from v1 at:

It's _not_ merge-ready yet - most importantly, I still don't know a good
way to detect interface config changes and invalidate the cache. I need
to ask Jason about that when he's back. However, the patch has seen quite
a few changes so I'm throwing it out there again before I stray too far
off course.


Changes in v2:

* Implement peer coalescing logic for multi-message genl dumps
* Query genetlink for WG link info only if it's not already cached
* Reuse an open genl socket kept in NMLinuxPlatformPrivate
* Cache wireguard genl family ID in NMLinuxPlatformPrivate
* Make peers/allowedips non-NMPObjects
* Move peers/allowedips into the private part of NMPObjectLnkWireguard
* Implement copy/cmp/hash for NMPlatformLnkWireguard
* Print peers/allowedips in NMP_OBJECT_TO_STRING_ALL mode
* Query interface by ifindex instead of ifname
* Error out when parsing an inet_addr not IPv4 or IPv6
* Make one string gs_free
* Reinstate nl80211 logging that was removed in v1
* Rebase on master @ d169cde872c4

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-netlink.c
  platform: add support for WireGuard links

 libnm-core/nm-core-types-internal.h    |  31 ++++
 src/nm-types.h                         |   2 +
 src/platform/nm-linux-platform.c       | 302 +++++++++++++++++++++++++++++++++
 src/platform/nm-netlink.c              |  68 ++++++++
 src/platform/nm-netlink.h              |  32 ++--
 src/platform/nm-platform.c             | 133 +++++++++++++++
 src/platform/nm-platform.h             |  19 +++
 src/platform/nmp-object.c              |  95 +++++++++++
 src/platform/nmp-object.h              |   9 +
 src/platform/wifi/wifi-utils-nl80211.c |  84 +--------
 10 files changed, 679 insertions(+), 96 deletions(-)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]