NetworkManager/src/platform
Thomas Haller a312dc6d1d platform: fix lookup of routes and deletion of IPv4 routes
When doing a lookup for an libnl route, the cache comparison function
for routes takes into account 'family', 'tos', 'table', 'dst', and 'prio'.

In NetworkManager we don't use all of these properties for a route, so
at several places when doing a cache lookup we don't have all identifying
properties. Usually we only have 'family' and 'dst' ('table' is
implicit 0, because NM does currently not care about any other tables).

The problem is that NM sees routes with different 'tos', 'prio', but it
cannot look them up in the cache. Add a hack to search the cache
fuzzy.

This is similar to the hack for link, where the identifying properties
are 'family' and 'ifindex', but we only have 'ifindex' at hand. However,
contrary to this hack, we coerce the 'family' to AF_UNSPEC for every link cache
operation. This is not viable in this case, because we internally need
the 'tos' field.

We need the 'tos' field because when deleting an IPv4 route, the 'tos' field must
match. See fib_table_delete(). This was already partially fixed by commit
f0daf90298, but before the lookup to the
cached object would fail for any non-zero 'tos'.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-30 18:39:09 +02:00
..
tests platform: allow setting address when adding software link (bridge) 2014-05-30 17:02:31 +02:00
wifi core/logging: trivial renaming internal LOGD_OLPC_MESH name to LOGD_OLPC 2014-05-12 18:52:27 +02:00
Makefile.am platform: add minimal Makefile.am for convenience 2013-06-19 13:48:29 +02:00
nm-fake-platform.c platform: allow setting address when adding software link (bridge) 2014-05-30 17:02:31 +02:00
nm-fake-platform.h platform: link management 2013-04-10 16:40:58 +02:00
nm-linux-platform.c platform: fix lookup of routes and deletion of IPv4 routes 2014-05-30 18:39:09 +02:00
nm-linux-platform.h platform: link management 2013-04-10 16:40:58 +02:00
nm-platform.c platform: allow setting address when adding software link (bridge) 2014-05-30 17:02:31 +02:00
nm-platform.h platform: allow setting address when adding software link (bridge) 2014-05-30 17:02:31 +02:00