diff options
| author | Michael Biebl <biebl@debian.org> | 2020-08-19 10:13:49 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2020-08-19 10:13:49 +0200 |
| commit | e7b44ef4c80907346ec7492a09c45277459924fc (patch) | |
| tree | b1388af193ca205f73336eca47e81815e43a61ca /src/nm-iface-helper.c | |
| parent | 136d191f1c96dbae1489fed7c2565f5e1b1f8d40 (diff) | |
New upstream version 1.26.2 upstream/1.26.2
Diffstat (limited to 'src/nm-iface-helper.c')
| -rw-r--r-- | src/nm-iface-helper.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/nm-iface-helper.c b/src/nm-iface-helper.c index 6320e722..c7d65d2a 100644 --- a/src/nm-iface-helper.c +++ b/src/nm-iface-helper.c @@ -41,11 +41,13 @@ static struct { GMainLoop *main_loop; int ifindex; + gboolean is_vrf_device; guint dad_failed_id; CList dad_failed_lst_head; } gl/*obal*/ = { .ifindex = -1, + .is_vrf_device = FALSE, }; static struct { @@ -120,6 +122,7 @@ dhcp4_state_changed (NMDhcpClient *client, nm_ip4_config_add_dependent_routes (existing, RT_TABLE_MAIN, global_opt.priority_v4, + gl.is_vrf_device, &ip4_dev_route_blacklist); if (!nm_ip4_config_commit (existing, NM_PLATFORM_GET, @@ -236,7 +239,8 @@ ndisc_config_changed (NMNDisc *ndisc, const NMNDiscData *rdata, guint changed_in nm_ip6_config_merge (existing, ndisc_config, NM_IP_CONFIG_MERGE_DEFAULT, 0); nm_ip6_config_add_dependent_routes (existing, RT_TABLE_MAIN, - global_opt.priority_v6); + global_opt.priority_v6, + gl.is_vrf_device); if (!nm_ip6_config_commit (existing, NM_PLATFORM_GET, NM_IP_ROUTE_TABLE_SYNC_MODE_MAIN, @@ -480,6 +484,11 @@ main (int argc, char *argv[]) if (pllink) { hwaddr = nmp_link_address_get_as_bytes (&pllink->l_address); bcast_hwaddr = nmp_link_address_get_as_bytes (&pllink->l_broadcast); + + if (pllink->master > 0) { + gl.is_vrf_device + = nm_platform_link_get_type (NM_PLATFORM_GET, pllink->master) == NM_LINK_TYPE_VRF; + } } if (global_opt.iid_str) { |