summaryrefslogtreecommitdiff
path: root/src/nm-types.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-09-28 08:40:41 +0200
committerThomas Haller <thaller@redhat.com>2017-10-09 22:05:36 +0200
commitcc1ee1d286a3de84fcebc33088d12fee21145d8a (patch)
treeef33eea1683d5230e3534869fb4d0225538315d3 /src/nm-types.h
parent17ca5c4c0c08116e3d2309b7f25b903440d66194 (diff)
downloadNetworkManager-cc1ee1d286a3de84fcebc33088d12fee21145d8a.tar.gz
all: rework configuring route table support by adding "route-table" setting
We added "ipv4.route-table-sync" and "ipv6.route-table-sync" to not change behavior for users that configured policy routing outside of NetworkManager, for example, via a dispatcher script. Users had to explicitly opt-in for NetworkManager to fully manage all routing tables. These settings were awkward. Replace them with new settings "ipv4.route-table" and "ipv6.route-table". Note that this commit breaks API/ABI on the unstable development branch by removing recently added API. As before, a connection will have no route-table set by default. This has the meaning that policy-routing is not enabled and only the main table will be fully synced. Once the user sets a table, we recognize that and NetworkManager manages all routing tables. The new route-table setting has other important uses: analog to "ipv4.route-metric", it is the default that applies to all routes. Currently it only works for static routes, not DHCP, SLAAC, default-route, etc. That will be implemented later. For static routes, each route still can explicitly set a table, and overwrite the per-connection setting in "ipv4.route-table" and "ipv6.route-table".
Diffstat (limited to 'src/nm-types.h')
-rw-r--r--src/nm-types.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nm-types.h b/src/nm-types.h
index bd5e249baa..af99bdcfad 100644
--- a/src/nm-types.h
+++ b/src/nm-types.h
@@ -197,6 +197,23 @@ typedef enum {
NM_IP_CONFIG_MERGE_NO_DNS = (1LL << 1),
} NMIPConfigMergeFlags;
+
+/**
+ * NMIPRouteTableSyncMode:
+ * @NM_IP_ROUTE_TABLE_SYNC_MODE_MAIN: only the main table is synced. For all
+ * other tables, NM won't delete any extra routes.
+ * @NM_IP_ROUTE_TABLE_SYNC_MODE_FULL: NM will sync all tables, except the
+ * local table (255).
+ * @NM_IP_ROUTE_TABLE_SYNC_MODE_ALL: NM will sync all tables, including the
+ * local table (255).
+ */
+typedef enum {
+ NM_IP_ROUTE_TABLE_SYNC_MODE_MAIN = 1,
+ NM_IP_ROUTE_TABLE_SYNC_MODE_FULL = 2,
+ NM_IP_ROUTE_TABLE_SYNC_MODE_ALL = 3,
+} NMIPRouteTableSyncMode;
+
+
/* settings */
typedef struct _NMAgentManager NMAgentManager;
typedef struct _NMSecretAgent NMSecretAgent;