summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-11-10 12:30:39 +0100
committerThomas Haller <thaller@redhat.com>2014-11-10 12:30:39 +0100
commitee0c1cf0bd68f4a8c6a4ae40018d7d0a827e8e20 (patch)
tree5a64e5571f87121e16b222461004a77473c78eba
parent14537c71d8a28f9805bd410f2df475db8b4aa6f6 (diff)
downloadNetworkManager-ee0c1cf0bd68f4a8c6a4ae40018d7d0a827e8e20.tar.gz
policy: fix using wrong loop counter in _platform_route_sync_flush()
Fixes: e8824f6a5205ffcf761abd3e0897a22b254c7797 Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/nm-default-route-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nm-default-route-manager.c b/src/nm-default-route-manager.c
index 22a042a4af..ec92d2d52c 100644
--- a/src/nm-default-route-manager.c
+++ b/src/nm-default-route-manager.c
@@ -204,7 +204,7 @@ _platform_route_sync_flush (const VTableIP *vtable, NMDefaultRouteManager *self)
NMDefaultRouteManagerPrivate *priv = NM_DEFAULT_ROUTE_MANAGER_GET_PRIVATE (self);
GPtrArray *entries = vtable->get_entries (priv);
GArray *routes;
- guint i;
+ guint i, j;
/* prune all other default routes from this device. */
if (VTABLE_IS_IP4)
@@ -224,8 +224,8 @@ _platform_route_sync_flush (const VTableIP *vtable, NMDefaultRouteManager *self)
/* look at all entires and see if the route for this ifindex pair is
* a known entry. */
- for (i = 0; i < entries->len; i++) {
- Entry *e = g_ptr_array_index (entries, i);
+ for (j = 0; j < entries->len; j++) {
+ Entry *e = g_ptr_array_index (entries, j);
if (e->never_default)
continue;