Commit Graph

512 Commits

Author SHA1 Message Date
Thomas Haller
b445b1f8fe platform: add nm_platform_link_get_ifi_flags() helper
Add helper nm_platform_link_get_ifi_flags() to access the
ifi-flags.

This replaces the internal API _link_get_flags() and makes it public.
However, the return value also allows to distinguish between errors
and valid flags.

Also, consider non-visible links. These are links that are in netlink,
but not visible in udev. The ifi-flags are inherrently netlink specific,
so it seems wrong to pretend that the link doesn't exist.
2018-11-29 13:50:10 +01:00
Thomas Haller
37e47fbdab build: avoid header conflict for <linux/if.h> and <net/if.h> with "nm-platform.h"
In the past, the headers "linux/if.h" and "net/if.h" were incompatible.
That means, we can either include one or the other, but not both.
This is fixed in the meantime, however the issue still exists when
building against older kernel/glibc.

That means, including one of these headers from a header file
is problematic. In particular if it's a header like "nm-platform.h",
which itself is dragged in by many other headers.

Avoid that by not including these headers from "platform.h", but instead
from the source files where needed (or possibly from less popular header
files).

Currently there is no problem. However, this allows an unknowing user to
include <net/if.h> at the same time with "nm-platform.h", which is easy
to get wrong.
2018-11-12 16:02:35 +01:00
Lubomir Rintel
0573656eeb platform/wpan: allow setting channel 2018-10-07 15:46:02 +02:00
Lubomir Rintel
8f107f5c00 platform: bring back the interface name to log messages
Fixes: ecf607cce6
2018-10-01 11:45:57 +02:00
Lubomir Rintel
ecf607cce6 platform: log the interface names 2018-10-01 10:26:05 +02:00
Rafael Fontenelle
34fd628990 Fix typos
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/21

[thaller@redhat.com: fix generated clients/common/settings-docs.h.in file
   and fix wrong change in src/systemd/src/libsystemd/sd-event/sd-event.c]
2018-09-30 21:14:55 +02:00
luz.paz
f985b6944a docs: misc. typos
Found via `codespell -q 3 --skip="*.po"`

https://github.com/NetworkManager/NetworkManager/pull/203
2018-09-15 09:08:03 +02:00
Thomas Haller
62d14e1884 platform/wireguard: rework parsing wireguard links in platform
- previously, parsing wireguard genl data resulted in memory corruption:

  - _wireguard_update_from_allowedips_nla() takes pointers to

      allowedip = &g_array_index (buf->allowedips, NMWireGuardAllowedIP, buf->allowedips->len - 1);

    but resizing the GArray will invalidate this pointer. This happens
    when there are multiple allowed-ips to parse.

  - there was some confusion who owned the allowedips pointers.
    _wireguard_peers_cpy() and _vt_cmd_obj_dispose_lnk_wireguard()
    assumed each peer owned their own chunk, but _wireguard_get_link_properties()
    would not duplicate the memory properly.

- rework memory handling for allowed_ips. Now, the NMPObjectLnkWireGuard
  keeps a pointer _allowed_ips_buf. This buffer contains the instances for
  all peers.
  The parsing of the netlink message is the complicated part, because
  we don't know upfront how many peers/allowed-ips we receive. During
  construction, the tracking of peers/allowed-ips is complicated,
  via a CList/GArray. At the end of that, we prettify the data
  representation and put everything into two buffers. That is more
  efficient and simpler for user afterwards. This moves complexity
  to the way how the object is created, vs. how it is used later.

- ensure that we nm_explicit_bzero() private-key and preshared-key. However,
  that only works to a certain point, because our netlink library does not
  ensure that no data is leaked.

- don't use a "struct sockaddr" union for the peer's endpoint. Instead,
  use a combintation of endpoint_family, endpoint_port, and
  endpoint_addr.

- a lot of refactoring.
2018-09-07 11:24:17 +02:00
Thomas Haller
c085b6e3a7 platform/ethtool: add code to get/set offload features via ethtool
Also, add two more features "tx-tcp-segmentation" and
"tx-tcp6-segmentation". There are two reasons for that:

 - systemd-networkd supports setting these two features,
   so lets support them too (apparently they are important
   enough for networkd).

 - these two features are already implicitly covered by "tso".
   Like for the "ethtool" program, "tso" is an alias for several
   actual features. By adding two features that are already
   also covered by an alias (which sets multiple kernel names
   at once), we showcase how aliases for the same feature can
   coexist. In particular, note how setting
   "tso on tx-tcp6-segmentation off" will behave as one would
   expect: all 4 tso features covered by the alias are enabled,
   except that particular one.
2018-08-10 10:38:19 +02:00
Javier Arteaga
edd5cf1a3c platform: rename instances of Wireguard to WireGuard
Respect WireGuard canonical capitalization on identifiers.
As per discussion on:
https://github.com/NetworkManager/NetworkManager/pull/162
2018-08-06 08:34:27 +02:00
Beniamino Galvani
8720dd3df1 platform: add support for changing VF attributes 2018-07-11 16:16:22 +02:00
Beniamino Galvani
7df3333879 platform: allow setting drivers-autoprobe on SR-IOV PFs
It is possible to tell kernel not to automatically autoprobe drivers
for VFs. This is useful, for example, if the VF must be used by a VM.
2018-07-11 16:16:22 +02:00
Thomas Haller
e1c7a2b5d0 all: don't use gchar/gshort/gint/glong but C types
We commonly don't use the glib typedefs for char/short/int/long,
but their C types directly.

    $ git grep '\<g\(char\|short\|int\|long\|float\|double\)\>' | wc -l
    587
    $ git grep '\<\(char\|short\|int\|long\|float\|double\)\>' | wc -l
    21114

One could argue that using the glib typedefs is preferable in
public API (of our glib based libnm library) or where it clearly
is related to glib, like during

  g_object_set (obj, PROPERTY, (gint) value, NULL);

However, that argument does not seem strong, because in practice we don't
follow that argument today, and seldomly use the glib typedefs.
Also, the style guide for this would be hard to formalize, because
"using them where clearly related to a glib" is a very loose suggestion.

Also note that glib typedefs will always just be typedefs of the
underlying C types. There is no danger of glib changing the meaning
of these typedefs (because that would be a major API break of glib).

A simple style guide is instead: don't use these typedefs.

No manual actions, I only ran the bash script:

  FILES=($(git ls-files '*.[hc]'))
  sed -i \
      -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>\( [^ ]\)/\1\2/g' \
      -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>  /\1   /g' \
      -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>/\1/g' \
      "${FILES[@]}"
2018-07-11 12:02:06 +02:00
Lubomir Rintel
79ddef403c merge: branch 'wireguard-platform' of https://github.com/jbeta/NetworkManager
https://github.com/NetworkManager/NetworkManager/pull/143
2018-07-09 11:08:12 +02:00
Beniamino Galvani
09a868a24e platform: add ip6gre/ip6gretap tunnels support
Add platform support for IP6GRE and IP6GRETAP tunnels. The former is a
virtual tunnel interface for GRE over IPv6 and the latter is the L2
variant.

The platform code internally reuses and extends the same structure
used by IPv6 tunnels.
2018-07-02 17:55:14 +02:00
Beniamino Galvani
4c2862b958 platform: add gretap tunnels support
Add platform support for GRETAP tunnels (Virtual L2 tunnel interface
GRE over IPv4) partially reusing the existing GRE code.
2018-07-02 17:55:14 +02:00
Beniamino Galvani
cdad8c6df9 platform: uniform logging for link-add functions
Print all the platform-lnk attributes in a consistent manner.
2018-07-02 17:55:14 +02:00
Beniamino Galvani
4b46c74af7 platform: fix printing macvtap links 2018-07-02 17:55:14 +02:00
Beniamino Galvani
2ac5860a06 platform: avoid double log messages
Certain platform operations are logged both in nm-platform.c and
nm-linux-platform.c, resulting in duplicate messages.  Drop log prints
from the latter.
2018-07-02 17:55:14 +02:00
Javier Arteaga
0827d4c2e4 platform: add support for WireGuard links
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.
2018-07-01 14:52:46 +02:00
Lubomir Rintel
47c51b3f26 platform: add support for 6LoWPAN links
The 6LoWPAN devices tunnel IPv6 over IEEE 802.14.5 WPAN links.
They are software devices without any interesting properties but the
parent linke.
2018-06-26 16:21:55 +02:00
Lubomir Rintel
5036406b58 platform: add support for WPAN links 2018-06-26 16:21:54 +02:00
Lubomir Rintel
732b63ffb7 paltform: add type argument to nm_platform_link_get_by_address()
Devices of different link types can actually have the same MAC address.
We'll want to use this to find a device of a particular type by its
hardware address.
2018-06-26 16:21:54 +02:00
Alfonso Sánchez-Beato
ac13027934 platform: add methods to retrieve current WoWLAN state 2018-06-22 13:54:37 +02:00
Francesco Giudici
45170bad5d platform: move link_duplex_to_string function to platform
Expose it as a regular platform function: change its name
to nm_platform_link_duplex_type_to_string().
2018-06-15 14:19:50 +02:00
Simon Fels
1621c79e7b platform: add support for wake-on-wlan
Co-authored-by: Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
2018-06-15 09:46:26 +02:00
Beniamino Galvani
851d89dc6a platform: sort known IPv6 addresses by scope before a sync
The order we want to enforce is only among addresses with the same
scope, as the kernel always keeps addresses sorted by
scope. Therefore, apply the same sorting to known addresses, so that
we don't try to unnecessary change the order of addresses with
different scopes.

https://bugzilla.redhat.com/show_bug.cgi?id=1578668
2018-05-30 17:59:57 +02:00
Lubomir Rintel
e69d386975 all: use the elvis operator wherever possible
Coccinelle:

  @@
  expression a, b;
  @@
  -a ? a : b
  +a ?: b

Applied with:

  spatch --sp-file ternary.cocci --in-place --smpl-spacing --dir .

With some manual adjustments on spots that Cocci didn't catch for
reasons unknown.

Thanks to the marvelous effort of the GNU compiler developer we can now
spare a couple of bits that could be used for more important things,
like this commit message. Standards commitees yet have to catch up.
2018-05-10 14:36:58 +02:00
Beniamino Galvani
9e7a324916 platform: fix adding direct route to gateway
Without ifindex, adding the direct route to gateway fails:

 platform: route-sync: failure to add IPv6 route: fd02::/64 via fd01::1 dev 1635 metric 101 mss 0 rt-src user: No route to host (113); try adding direct route to gateway fd01::1/128 via :: metric 101 mss 0 rt-src user
 platform: route: append     IPv6 route: fd01::1/128 via :: metric 101 mss 0 rt-src user
 platform-linux: delayed-action: schedule wait-for-nl-response (seq 269, timeout in 0.199999195, response-type 0)
 platform-linux: delayed-action: handle wait-for-nl-response (any)
 platform-linux: netlink: recvmsg: new message NLMSG_ERROR, flags 0, seq 269
 platform-linux: netlink: recvmsg: error message from kernel: No such device (19) for request 269

Fixes: c9f89cafdf
2018-05-07 17:15:34 +02:00
Beniamino Galvani
1b5925ce88 all: remove consecutive empty lines
Normalize coding style by removing consecutive empty lines from C
sources and headers.

https://github.com/NetworkManager/NetworkManager/pull/108
2018-04-30 16:24:52 +02:00
Beniamino Galvani
aca671fff0 all: replace "it's" with "its" where needed 2018-04-18 14:14:07 +02:00
Thomas Haller
43dee5f192 platform: minor cleanup of nm_platform_ip6_address_sync()
Drop the "delete_remaining" variable, and instead rely on the value of "i_know"
alone. Also, add a code comment explaining better what is happening.
2018-04-10 14:20:19 +02:00
Thomas Haller
b50d7cc653 platform: fix IPv6 address sync after for link local addresses
Since commit 78ed0a4a23 (device: add
IPv6 link local address via merge-and-apply) we handle also IPv6 link
local addresses like regular addresses. That is, we also add them during
merge-and-apply and sync them via nm_platform_ip6_address_sync().

ip6-address-sync loops over the platform addresses, to find which
addresses shall be deleted, and which shall be deleted in order to
fix the address order/priority. At that point, we must not ignore
link-local addresses anymore, but handle them too.

Otherwise, during each resync we have link local addresses, and
platform-sync thinks that the address order is wrong. That wrongly
leads to remove most addresses and re-adding them.

Fixes: 78ed0a4a23
2018-04-10 14:09:56 +02:00
Thomas Haller
ef93f6caad platform: support creating non-persistant TUN/TAP devices
For completeness, extend the API to support non-persistant
device. That requires that nm_platform_link_tun_add()
returns the file descriptor.

While NetworkManager doesn't create such devices itself,
it recognizes the IFLA_TUN_PERSIST / IFF_PERSIST flag.
Since ip-tuntap (obviously) cannot create such devices,
we cannot add a test for how non-persistent devices look
in the platform cache. Well, we could instead add them
with ioctl directly, but instead, just extend the platform
API to allow for that.

Also, use the function from test-lldp.c to (optionally) use
nm_platform_link_tun_add() to create the tap device.
2018-04-09 20:16:31 +02:00
Thomas Haller
01ad4f33ed platform: adjust format for nm_platform_lnk_tun_to_string() and print "persist"
Switch from "pi on|off" to optinally printing "pi" to indicate
whether the flag is set. That follows ip-tuntap syntax and is
more familiar:

    $ ip tuntap help
    Usage: ip tuntap { add | del | show | list | lst | help } [ dev PHYS_DEV ]
              [ mode { tun | tap } ] [ user USER ] [ group GROUP ]
              [ one_queue ] [ pi ] [ vnet_hdr ] [ multi_queue ] [ name NAME ]

    Where: USER  := { STRING | NUMBER }
           GROUP := { STRING | NUMBER }

Also, print the "persist" flag.
2018-04-09 20:16:30 +02:00
Thomas Haller
530b5755ad platform: fix double whitespace for tun device in nm_platform_lnk_tun_to_string() 2018-04-09 20:16:30 +02:00
Thomas Haller
c9f89cafdf platform: adding onlink gateway route for manual addresses
Kernel does not all allow to configure a route via a gateway, if the
gateway is not directly reachable.

For non-manually added routes (e.g. from DHCP), we ignore them as a
server configuration errors. For manually added routes, we try to work
around them.

Note that if the user adds a manual route that references a gateway,
maybe he should be required to also add a matching onlink route for
the gateway (or an address that results in a device-route), otherwise
the configuration could be considered invalid. That was however not
done historically, and also, it seems a rather unhelpful behavior.
NetworkManage should just make it work, not not assume anything is
wrong with the configuration. Similarly, for IPv4, the user could
configure the route as onlink, however, that still requires extra
configuration of which the user might not be aware.

This would apply for example, when a connection has method=auto,
and would obtain the routes automatically. It seems sensible to
allow the user to add a route via the gateway, if he ~knows~ that
this particular network will provide such a configuration via DHCP.

In the past however, we tried not to automatically add a device route,
but instead see whether we will get a suitable route via DHCP. If we
wouldn't get such a route, we would however fail the connection.
However, this is really very hard to get right.
We call ip_config_merge_and_apply() possibly before receiving automatic
IP configuration (commit 7070d17ced, "device: reset
@con_ip6_config on failure before RA"). In this case, we could not yet
configure the route. Instead, we also cannot fail (yet), because we should
wait whether we will receive a route that makes this configuration
feasable.
That is hard to get right. How long should we wait? If we get a DHCP lease
and still cannot add the route, should we fail the IP configuration or wait
longer for another lease? Worse, if we decide to fail the IP configuration,
it might not fail the entire activation. Instead, we would only mark the
current address family as failed. If we later get a DHCP lease, should we
retry to add the route again? -- probably yes. If we still fail, we would
need to keep the IP configuration in failed state, regardless that DHCP
succeeded. Part of the problem is, that we are bad at tracking the
failed state per IP method. So, if manual configuration fails but DHCP
succeeds, we get the state wrong. That should be fixed separately, but it
just shows how hard it is to have this route that we currently cannot
add, and wanting to wait for something that might never come, but still
fail at some point.

Instead, if we cannot add a route due to a missing onlink gateway,
just retry and add the /32 or /128 direct route ourself.

Note that for IPv6 routes that have a "src" address which is still
TENTATIVE, we also cannot currently add the route and retry later.
However, that is fundamentally different, because:
  - the configuration here is correct, it's only that the address
    didn't yet pass IPv6 DAD and kernel is being unhelpful (rh#1457196).
  - we only have to wait a few seconds for DAD to complete or fail.
    So, it's easy to implement this sensibly.
2018-04-04 14:57:07 +02:00
Thomas Haller
dee6dd6e4e platform: reorder failure checks in nm_platform_ip_route_sync()
Move handling non-NM_IP_CONFIG_SOURCE_USER routes first. These are
routes that were added manually by the user in the connection.

Note that there is no change in behavior, because of how
_err_inval_due_to_ipv6_tentative_pref_src() would only accept
user routes already.
2018-03-26 16:56:05 +02:00
Thomas Haller
03a9bb88aa platform: improve logging message for failure to add route
The errno for this particular failure differs between IPv4 and IPv6.
Of course it does.
2018-03-22 16:56:28 +01:00
Thomas Haller
39ab38a04d core/platform: add support for TUN/TAP netlink support and various cleanup
Kernel recently got support for exposing TUN/TAP information on netlink
[1], [2], [3]. Add support for it to the platform cache.

The advantage of using netlink is that querying sysctl bypasses the
order of events of the netlink socket. It is out of sync and racy. For
example, platform cache might still think that a tun device exists, but
a subsequent lookup at sysfs might fail because the device was deleted
in the meantime. Another point is, that we don't get change
notifications via sysctl and that it requires various extra syscalls
to read the device information. If the tun information is present on
netlink, put it into the cache. This bypasses checking sysctl while
we keep looking at sysctl for backward compatibility until we require
support from kernel.

Notes:

- we had two link types NM_LINK_TYPE_TAP and NM_LINK_TYPE_TUN. This
  deviates from the model of how kernel treats TUN/TAP devices, which
  makes it more complicated. The link type of a NMPlatformLink instance
  should match what kernel thinks about the device. Point in case,
  when parsing RTM_NETLINK messages, we very early need to determine
  the link type (_linktype_get_type()). However, to determine the
  type of a TUN/TAP at that point, we need to look into nested
  netlink attributes which in turn depend on the type (IFLA_INFO_KIND
  and IFLA_INFO_DATA), or even worse, we would need to look into
  sysctl for older kernel vesions. Now, the TUN/TAP type is a property
  of the link type NM_LINK_TYPE_TUN, instead of determining two
  different link types.

- various parts of the API (both kernel's sysctl vs. netlink) and
  NMDeviceTun vs. NMSettingTun disagree whether the PI is positive
  (NM_SETTING_TUN_PI, IFLA_TUN_PI, NMPlatformLnkTun.pi) or inverted
  (NM_DEVICE_TUN_NO_PI, IFF_NO_PI). There is no consistent way,
  but prefer the positive form for internal API at NMPlatformLnkTun.pi.

- previously NMDeviceTun.mode could not change after initializing
  the object. Allow for that to happen, because forcing some properties
  that are reported by kernel to not change is wrong, in case they
  might change. Of course, in practice kernel doesn't allow the device
  to ever change its type, but the type property of the NMDeviceTun
  should not make that assumption, because, if it actually changes, what
  would it mean?

- note that as of now, new netlink API is not yet merged to mainline Linus
  tree. Shortcut _parse_lnk_tun() to not accidentally use unstable API
  for now.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1277457
[2] https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=1ec010e705934c8acbe7dbf31afc81e60e3d828b
[3] https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=118eda77d6602616bc523a17ee45171e879d1818

https://bugzilla.redhat.com/show_bug.cgi?id=1547213
https://github.com/NetworkManager/NetworkManager/pull/77
2018-03-20 11:59:52 +01:00
Thomas Haller
d6bbac1b7d platform: minor cleanup of assertions in nm_platform_cache_update_emit_signal()
NMTST_ASSERT_PLATFORM_NETNS_CURRENT() already checks that the current namespace
is correct. Remove the duplicate assertion.

Also, NMP_CACHE_OPS_UNCHANGED is numerically identical to NM_PLATFORM_SIGNAL_NONE.
Use it in the assertion.
2018-03-09 17:52:43 +01:00
Thomas Haller
79980536b9 platform: add nm_platform_process_events_ensure_link() function 2018-02-21 20:28:46 +01:00
Thomas Haller
1f08b01714 platform: cleanup nm_platform_link_get_address() to return-early
Avoid nested if-blocks, and instead check conditions and return early.
2018-02-15 16:08:00 +01:00
Thomas Haller
0d53e093e6 platform: fix handling secondary addresses during nm_platform_ip4_address_sync()
Although IFA_F_TEMPORARY is numerically equal to IFA_F_SECONDARY,
their meaning is different. One applies to IPv6 temporary addresses,
and the other to IPv4 secondary addresses.

During _addr_array_clean_expired() we want to ignore and clear
IPv6 temporary addresses, but not IPv4 secondary addresses.

Fixes: f2c4720bca
2018-02-09 21:08:07 +01:00
Thomas Haller
3e9e51f1dd core: distinguish between IFA_F_SECONDARY and IFA_F_TEMPORARY
While the numerical values of IFA_F_SECONDARY and IFA_F_TEMPORARY
are identical, their meaning is not.

IFA_F_SECONDARY is only relevant for IPv4 addresses, while
IFA_F_TEMPORARY is only relevant for IPv6 addresses.

IFA_F_TEMPORARY is automatically set by kernel for the addresses
that it generates as part of IFA_F_MANAGETEMPADDR. It cannot be
actively set by user-space.

IFA_F_SECONDARY is automatically set by kernel depending on the order
in which the addresses for the same subnet are added.

This essentially reverts 8b4f11927 (core: avoid IFA_F_TEMPORARY alias for
IFA_F_SECONDARY).
2018-02-09 21:07:57 +01:00
Thomas Haller
7e208c1d28 platform: rework nm_platform_ip6_address_sync() to fix address order
We want to add addresses in a particular order so that source address
selection works.

Note that @known_addresses contains the desired addresses in order of
least-important first, while @plat_addresses contains them in opposite
order. Previously, this inverted order was not considered, and we
essentially ended up removing and re-adding all addresses every time.

Fix that. While at it, get rid of the O(n^2) runtime complexity, and
make it O(n) by iterating both lists simultaneously.
2018-02-09 17:40:01 +01:00
Thomas Haller
f2c4720bca platform: clear temporary addresses early during nm_platform_ip6_address_sync()
Temporary addresses (RFC4941) are not handled by NetworkManager directly, but by
kernel. If they are in the @known_addresses list, clear them out early.
They shall be ignored.
2018-02-09 17:40:01 +01:00
Thomas Haller
d5a51a1ad2 platform: modifiy @known_addresses list in nm_platform_ip6_address_sync()
Often, we want in API that an input argument is read-only and not modified
by the function call. Not modifying input arguments is a good
convention.

However, in this case there are only two callers, and both clearly do
not care whether the @known_addresses array will be modified.

Clear out addresses that are already expired and enforce that there are
no duplicate addresses. Basically, use @known_addresses for bookkeeping
which addresses are to be ignored.
2018-02-09 17:40:01 +01:00
Thomas Haller
7f223cb827 platform: refactor initial cleanup of know-addresses list in nm_platform_ip4_address_sync()
We do a pre-run that constructs an index of all addresses and drops
addresses that are already expired.

Move this code to a separate function, it will be reused for IPv6.

Also, note that nm_platform_ip4_address_sync() has only 2 callers. Both
callers make sure to not pass duplicate known addresses, because the
addresses also come from a cache. Make that a requirement and assert
against unique addresses. If we would allow duplicate addresses, we would
have to handle them in a defined way (like, dropping the ones with lower
priority). That would be more complicated, and since no caller is
supposed to provide duplicate addresses, don't bother but assert.
2018-02-09 17:40:01 +01:00
Thomas Haller
7459548f23 core: return remaining lifetime from nm_utils_lifetime_get()
nm_utils_lifetime_get() already has so many arguments.
Essentially, the function returned %TRUE if and only if the
lifetime was greater then zero.

Combine the return value and the output argument for the lifetime.

It also matches better the function name: to get the lifetime.
2018-02-09 17:40:01 +01:00