summaryrefslogtreecommitdiff
path: root/src/platform/nm-platform.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-08-02 07:16:35 +0200
committerThomas Haller <thaller@redhat.com>2017-08-03 18:51:57 +0200
commit75dc0fdd27ff7c96429f27ffd8d9ea4c361d7c26 (patch)
treeb2a86f9f2fd26b4e05285903eba29edf2e10412b /src/platform/nm-platform.h
parentf5c800885b28c18efc46aad96630703a49dc7c57 (diff)
downloadNetworkManager-75dc0fdd27ff7c96429f27ffd8d9ea4c361d7c26.tar.gz
platform,libnm: cleanup handling of TOS for routes
- kernel ignores rtm_tos for IPv6 routes. While iproute2 accepts it, let libnm reject TOS attribute for routes as well. - move the tos field from NMPlatformIPRoute to NMPlatformIP4Route. - the tos field is part of the weak-id of an IPv4 route. Meaning, `ip route add` can add routes that only differ by their TOS.
Diffstat (limited to 'src/platform/nm-platform.h')
-rw-r--r--src/platform/nm-platform.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h
index ddd1f11e18..9f04d08917 100644
--- a/src/platform/nm-platform.h
+++ b/src/platform/nm-platform.h
@@ -392,8 +392,8 @@ typedef union {
guint32 mtu; \
\
\
+ /* RTA_PRIORITY (iproute2: metric) */ \
guint32 metric; \
- guint32 tos; \
\
/*end*/
@@ -422,6 +422,13 @@ struct _NMPlatformIP4Route {
* pref_src must match, unless set to 0.0.0.0 to match any. */
in_addr_t pref_src;
+ /* rtm_tos (iproute2: tos)
+ *
+ * For IPv4, tos is part of the weak-id (like metric).
+ *
+ * For IPv6, tos is ignored by kernel. */
+ guint8 tos;
+
/* The bitwise inverse of the route scope rtm_scope. It is inverted so that the
* default value (RT_SCOPE_NOWHERE) is zero. Use nm_platform_route_scope_inv()
* to convert back and forth between the inverese representation and the