1 |
From 46e0af2942e23fb3cf1c313e58e4081877d4f289 Mon Sep 17 00:00:00 2001 |
2 |
From: Dan Williams <dcbw@redhat.com> |
3 |
Date: Thu, 30 Aug 2012 13:57:06 -0500 |
4 |
Subject: [PATCH] ip6: ignore cached/cloned routes when retrieving IPv6 config |
5 |
(lp:1038541) (bgo #671767) |
6 |
|
7 |
Should also ignore them when building up the initial IPv6 config. |
8 |
--- |
9 |
src/ip6-manager/nm-ip6-manager.c | 6 ++++++ |
10 |
1 file changed, 6 insertions(+) |
11 |
|
12 |
diff --git a/src/ip6-manager/nm-ip6-manager.c b/src/ip6-manager/nm-ip6-manager.c |
13 |
index 3dc8616..4432aa5 100644 |
14 |
--- a/src/ip6-manager/nm-ip6-manager.c |
15 |
+++ b/src/ip6-manager/nm-ip6-manager.c |
16 |
@@ -1531,6 +1531,12 @@ nm_ip6_manager_get_ip6_config (NMIP6Manager *manager, int ifindex) |
17 |
if (rtnl_route_get_family (rtnlroute) != AF_INET6) |
18 |
continue; |
19 |
|
20 |
+ /* And ignore cache/cloned routes as they aren't part of the interface's |
21 |
+ * permanent routing configuration. |
22 |
+ */ |
23 |
+ if (rtnl_route_get_flags (rtnlroute) & RTM_F_CLONED) |
24 |
+ continue; |
25 |
+ |
26 |
nldest = rtnl_route_get_dst (rtnlroute); |
27 |
if (!nldest || nl_addr_get_family (nldest) != AF_INET6) |
28 |
continue; |
29 |
-- |
30 |
1.7.12 |
31 |
|