Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1445908 Details for
Bug 1578668
[NMCI] nmcli_general_correct_profile_activated_after_restart test failure
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[PATCH] platform: sort known IPv6 addresses by scope before a sync
0001-platform-sort-known-IPv6-addresses-by-scope-before-a.patch (text/plain), 2.04 KB, created by
Beniamino Galvani
on 2018-05-30 14:03:21 UTC
(
hide
)
Description:
[PATCH] platform: sort known IPv6 addresses by scope before a sync
Filename:
MIME Type:
Creator:
Beniamino Galvani
Created:
2018-05-30 14:03:21 UTC
Size:
2.04 KB
patch
obsolete
>From 78a559c21de0605939e77e7a53d2e77f7628afc7 Mon Sep 17 00:00:00 2001 >From: Beniamino Galvani <bgalvani@redhat.com> >Date: Wed, 30 May 2018 11:37:09 +0200 >Subject: [PATCH] platform: sort known IPv6 addresses by scope before a sync > >The order we want to enforce is only among addresses with the same >scope, as the kernel always keeps addresses sorted by >scope. Therefore, apply the same sorting to known addresses, so that >we don't try to unnecessary change the order of addresses with >different scopes. > >https://bugzilla.redhat.com/show_bug.cgi?id=1578668 >--- > src/platform/nm-platform.c | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > >diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c >index 727e064bd..e3d194c02 100644 >--- a/src/platform/nm-platform.c >+++ b/src/platform/nm-platform.c >@@ -3595,6 +3595,25 @@ delete_and_next2: > return TRUE; > } > >+static guint >+ip6_address_scope_priority (struct in6_addr *addr) >+{ >+ if (IN6_IS_ADDR_LINKLOCAL (addr)) >+ return 1; >+ if (IN6_IS_ADDR_SITELOCAL (addr)) >+ return 2; >+ return 3; >+} >+ >+static gint >+ip6_address_scope_cmp (gconstpointer a, gconstpointer b) >+{ >+ NMPlatformIP6Address *x = NMP_OBJECT_CAST_IP6_ADDRESS (*(void **) a); >+ NMPlatformIP6Address *y = NMP_OBJECT_CAST_IP6_ADDRESS (*(void **) b); >+ >+ return ip6_address_scope_priority (&x->address) - ip6_address_scope_priority (&y->address); >+} >+ > /** > * nm_platform_ip6_address_sync: > * @self: platform instance >@@ -3628,6 +3647,14 @@ nm_platform_ip6_address_sync (NMPlatform *self, > NMPLookup lookup; > guint32 ifa_flags; > >+ /* The order we want to enforce is only among addresses with the same >+ * scope, as the kernel keeps addresses sorted by scope. Therefore, >+ * apply the same sorting to known addresses, so that we don't try to >+ * unnecessary change the order of addresses with different scopes. >+ */ >+ if (known_addresses) >+ g_ptr_array_sort (known_addresses, ip6_address_scope_cmp); >+ > if (!_addr_array_clean_expired (AF_INET6, ifindex, known_addresses, now, &known_addresses_idx)) > known_addresses = NULL; > >-- >2.17.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1578668
:
1441448
| 1445908