NetworkManager/src/platform
Thomas Haller f94142284d platform: don't consult cache before invoking netlink operation
Checking whether the link exists in the cache, before talking to kernel
serves no purpose.

- in all cases, the caller already has a good indication that the link
  in fact exists. That is, because the caller makes decisions on what to
  do, based on what platform told it earlier. Thus, the check usually succeeds
  anyway.

- in the unexpected case it doesn't succeed, we

  - should not silently return without logging at least a message

  - we possibly still want to send the netlink message to kernel,
    just to have it fail. Note that the ifindex is indeed the identifier
    for the link, so there is no danger of accidentally killing the
    wrong link.
    Well, theoretically there is, because the kernel's ifindex counter can
    wrap or get reused when moving links between namespaces. But checking
    the cache would not protect against that anyway! Worst case, the cache
    would already have the impostor link and would not prevent from doing
    the wrong thing. After all, they do have the same identifier, so how
    would we know that this is in fact a different link?
2018-12-03 12:26:16 +01:00
..
linux platform: import nl82154.h 2018-06-26 16:21:54 +02:00
tests platform: assert against valid ifindex and remove duplicate assertions 2018-12-03 12:26:16 +01:00
wifi all: say Wi-Fi instead of "wifi" or "WiFi" 2018-11-29 17:53:35 +01:00
wpan build: avoid header conflict for <linux/if.h> and <net/if.h> with "nm-platform.h" 2018-11-12 16:02:35 +01:00
nm-fake-platform.c build: avoid header conflict for <linux/if.h> and <net/if.h> with "nm-platform.h" 2018-11-12 16:02:35 +01:00
nm-fake-platform.h core: refactor private data in "src" 2016-10-04 09:50:56 +02:00
nm-linux-platform.c platform/wpan: allow setting channel 2018-10-07 15:46:02 +02:00
nm-linux-platform.h platform: use NMDedupMultiIndex for routes in NMPCache 2017-07-05 18:37:38 +02:00
nm-netlink.c docs: misc. typos 2018-09-15 09:08:03 +02:00
nm-netlink.h platform/netlink: fix overrun in attribute iteration in nla_ok() 2018-10-10 12:04:27 +02:00
nm-platform-private.h platform: expose emit-signal function from platform 2017-07-05 18:37:39 +02:00
nm-platform-utils.c build: avoid header conflict for <linux/if.h> and <net/if.h> with "nm-platform.h" 2018-11-12 16:02:35 +01:00
nm-platform-utils.h platform/ethtool: add code to get/set offload features via ethtool 2018-08-10 10:38:19 +02:00
nm-platform.c platform: don't consult cache before invoking netlink operation 2018-12-03 12:26:16 +01:00
nm-platform.h platform: add nm_platform_link_get_ifi_flags() helper 2018-11-29 13:50:10 +01:00
nmp-netns.c platform/netns: don't try to overlay ro /sys with a rw one 2018-02-12 20:46:47 +01:00
nmp-netns.h core: cleanup implementation of nm_auto* macros to use nm_auto() 2017-10-11 08:43:40 +02:00
nmp-object.c platform: let nmp_cache_lookup_link_full() prefer visible links 2018-12-03 12:26:16 +01:00
nmp-object.h docs: misc. typos 2018-09-15 09:08:03 +02:00