From 093d62315617cd9729a3a3e79163980582de054c Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mar 04 2015 23:51:36 +0000 Subject: core: flush IPv6LL address when deconfiguring managed devices (rh #1193127) (rh #1184997) --- diff --git a/0001-ip6-config-remove-the-link-local-address-on-address-.patch b/0001-ip6-config-remove-the-link-local-address-on-address-.patch new file mode 100644 index 0000000..855762d --- /dev/null +++ b/0001-ip6-config-remove-the-link-local-address-on-address-.patch @@ -0,0 +1,83 @@ +From cdf17af6579a6ddebc1a76affbfa756432bc6bfa Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 28 Jan 2015 12:00:00 +0100 +Subject: [PATCH] ip6-config: remove the link-local address on address flush + +If it stays after device dispose a connection is assumed. + +https://bugzilla.redhat.com/show_bug.cgi?id=1184997 +(cherry picked from commit 6771f836ce3518bc75f0cbbed74138f40c890f7d) +--- + src/nm-ip6-config.c | 2 +- + src/platform/nm-platform.c | 7 ++++--- + src/platform/nm-platform.h | 2 +- + 3 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/src/nm-ip6-config.c b/src/nm-ip6-config.c +index db64e72..63b4260 100644 +--- a/src/nm-ip6-config.c ++++ b/src/nm-ip6-config.c +@@ -375,7 +375,7 @@ nm_ip6_config_commit (const NMIP6Config *config, int ifindex) + g_return_val_if_fail (config != NULL, FALSE); + + /* Addresses */ +- nm_platform_ip6_address_sync (ifindex, priv->addresses); ++ nm_platform_ip6_address_sync (ifindex, priv->addresses, TRUE); + + /* Routes */ + { +diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c +index 14fc44c..f679fe5 100644 +--- a/src/platform/nm-platform.c ++++ b/src/platform/nm-platform.c +@@ -1826,6 +1826,7 @@ nm_platform_ip4_address_sync (int ifindex, const GArray *known_addresses, guint3 + * nm_platform_ip6_address_sync: + * @ifindex: Interface index + * @known_addresses: List of addresses ++ * @keep_link_local: Don't remove link-local address + * + * A convenience function to synchronize addresses for a specific interface + * with the least possible disturbance. It simply removes addresses that are +@@ -1834,7 +1835,7 @@ nm_platform_ip4_address_sync (int ifindex, const GArray *known_addresses, guint3 + * Returns: %TRUE on success. + */ + gboolean +-nm_platform_ip6_address_sync (int ifindex, const GArray *known_addresses) ++nm_platform_ip6_address_sync (int ifindex, const GArray *known_addresses, gboolean keep_link_local) + { + GArray *addresses; + NMPlatformIP6Address *address; +@@ -1847,7 +1848,7 @@ nm_platform_ip6_address_sync (int ifindex, const GArray *known_addresses) + address = &g_array_index (addresses, NMPlatformIP6Address, i); + + /* Leave link local address management to the kernel */ +- if (IN6_IS_ADDR_LINKLOCAL (&address->address)) ++ if (keep_link_local && IN6_IS_ADDR_LINKLOCAL (&address->address)) + continue; + + if (!array_contains_ip6_address (known_addresses, address)) +@@ -1880,7 +1881,7 @@ gboolean + nm_platform_address_flush (int ifindex) + { + return nm_platform_ip4_address_sync (ifindex, NULL, 0) +- && nm_platform_ip6_address_sync (ifindex, NULL); ++ && nm_platform_ip6_address_sync (ifindex, NULL, FALSE); + } + + /******************************************************************/ +diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h +index 3f37ed6..62eb0f4 100644 +--- a/src/platform/nm-platform.h ++++ b/src/platform/nm-platform.h +@@ -572,7 +572,7 @@ gboolean nm_platform_ip6_address_delete (int ifindex, struct in6_addr address, i + gboolean nm_platform_ip4_address_exists (int ifindex, in_addr_t address, int plen); + gboolean nm_platform_ip6_address_exists (int ifindex, struct in6_addr address, int plen); + gboolean nm_platform_ip4_address_sync (int ifindex, const GArray *known_addresses, guint32 device_route_metric); +-gboolean nm_platform_ip6_address_sync (int ifindex, const GArray *known_addresses); ++gboolean nm_platform_ip6_address_sync (int ifindex, const GArray *known_addresses, gboolean keep_link_local); + gboolean nm_platform_address_flush (int ifindex); + + gboolean nm_platform_ip4_check_reinstall_device_route (int ifindex, const NMPlatformIP4Address *address, guint32 device_route_metric); +-- +2.1.0 + diff --git a/NetworkManager.spec b/NetworkManager.spec index 43c13bf..1538ab4 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -10,7 +10,7 @@ %define snapshot %{nil} %define git_sha %{nil} %define realversion 1.0.0 -%define release_version 4 +%define release_version 5 %define epoch_version 1 %define obsoletes_nmver 1:0.9.9.95-1 @@ -84,6 +84,8 @@ Patch1: 0001-rh1116999-resolv-conf-symlink.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1162636 Patch2: NetworkManager-1.0.0-bridge_resume.patch +Patch3: 0001-ip6-config-remove-the-link-local-address-on-address-.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %if 0%{?fedora} && 0%{?fedora} < 20 @@ -368,6 +370,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment. %patch0 -p1 -b .0000-explain-dns1-dns2.orig %patch1 -p1 -b .0001-rh1116999-resolv-conf-symlink.orig %patch2 -p1 -b .bridge_resume +%patch3 -p1 -b .v6ll-flush %build @@ -660,6 +663,9 @@ fi %endif %changelog +* Wed Mar 4 2015 Dan Williams - 1:1.0.0-5 +- core: flush IPv6LL address when deconfiguring managed devices (rh #1193127) (rh #1184997) + * Thu Jan 29 2015 Adam Williamson - 1:1.0.0-4 - core: resume bridged connections properly (rh #1162636, backport from master)