Change-Id: I291a2e425b1bc97b180012f47ecc817e306f36e5
Reviewed-on: http://photon-jenkins.eng.vmware.com/894
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: suezzelur <anishs@vmware.com>
(cherry picked from commit 1fbee1744edbedbb25a1ba4d455cd016c03966d0)
Reviewed-on: http://photon-jenkins.eng.vmware.com/946
Tested-by: suezzelur <anishs@vmware.com>
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 |
-diff -ru systemd-228/src/network/networkd-link.c systemd-228-1/src/network/networkd-link.c |
|
| 2 |
-+++ systemd-228-1/src/network/networkd-link.c 2016-02-22 21:32:34.266133364 -0800 |
|
| 1 |
+diff -aur systemd-228-1/src/network/networkd-link.c systemd-228-1a/src/network/networkd-link.c |
|
| 2 |
+--- systemd-228-1/src/network/networkd-link.c 2016-05-18 16:19:06.757698227 -0700 |
|
| 3 | 3 |
@@ -134,6 +134,26 @@ |
| 4 | 4 |
return link->network->ip_forward & ADDRESS_FAMILY_IPV6; |
| 5 | 5 |
} |
| ... | ... |
@@ -28,37 +28,12 @@ diff -ru systemd-228/src/network/networkd-link.c systemd-228-1/src/network/netwo |
| 28 | 28 |
bool link_ipv6_accept_ra_enabled(Link *link) {
|
| 29 | 29 |
if (link->flags & IFF_LOOPBACK) |
| 30 | 30 |
return false; |
| 31 |
-@@ -602,22 +622,17 @@ |
|
| 32 |
- Iterator i; |
|
| 33 |
- |
|
| 34 |
- assert(link); |
|
| 35 |
-- |
|
| 36 |
- if (!link->network) |
|
| 37 |
- return; |
|
| 38 |
-- |
|
| 39 |
- if (!link->static_configured) |
|
| 40 |
- return; |
|
| 41 |
-- |
|
| 42 |
- if (link_ipv4ll_enabled(link)) |
|
| 43 |
- if (!link->ipv4ll_address || |
|
| 31 |
+@@ -614,7 +634,7 @@ |
|
| 44 | 32 |
!link->ipv4ll_route) |
| 45 | 33 |
return; |
| 46 |
-- |
|
| 34 |
+ |
|
| 47 | 35 |
- if (link_ipv6ll_enabled(link)) |
| 48 | 36 |
+ if (!link_ipv6_disabled(link) && link_ipv6ll_enabled(link)) |
| 49 | 37 |
if (in_addr_is_null(AF_INET6, (const union in_addr_union*) &link->ipv6ll_address) > 0) |
| 50 | 38 |
return; |
| 51 |
-- |
|
| 52 |
- if ((link_dhcp4_enabled(link) && !link_dhcp6_enabled(link) && |
|
| 53 |
- !link->dhcp4_configured) || |
|
| 54 |
- (link_dhcp6_enabled(link) && !link_dhcp4_enabled(link) && |
|
| 55 |
-@@ -625,8 +640,7 @@ |
|
| 56 |
- (link_dhcp4_enabled(link) && link_dhcp6_enabled(link) && |
|
| 57 |
- !link->dhcp4_configured && !link->dhcp6_configured)) |
|
| 58 |
- return; |
|
| 59 |
-- |
|
| 60 |
-- if (link_ipv6_accept_ra_enabled(link) && !link->ndisc_configured) |
|
| 61 |
-+ if (!link_ipv6_disabled(link) && link_ipv6_accept_ra_enabled(link) && !link->ndisc_configured) |
|
| 62 |
- return; |
|
| 63 | 39 |
|
| 64 |
- SET_FOREACH(a, link->addresses, i) |
| 65 | 40 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,103 @@ |
| 0 |
+diff -aur systemd-228/src/network/networkd-link.c systemd-228-1/src/network/networkd-link.c |
|
| 1 |
+--- systemd-228/src/network/networkd-link.c 2015-11-17 23:59:06.000000000 -0800 |
|
| 2 |
+@@ -626,9 +626,6 @@ |
|
| 3 |
+ !link->dhcp4_configured && !link->dhcp6_configured)) |
|
| 4 |
+ return; |
|
| 5 |
+ |
|
| 6 |
+- if (link_ipv6_accept_ra_enabled(link) && !link->ndisc_configured) |
|
| 7 |
+- return; |
|
| 8 |
+- |
|
| 9 |
+ SET_FOREACH(a, link->addresses, i) |
|
| 10 |
+ if (!address_is_ready(a)) |
|
| 11 |
+ return; |
|
| 12 |
+@@ -1926,6 +1923,7 @@ |
|
| 13 |
+ |
|
| 14 |
+ static int link_set_ipv6_accept_ra(Link *link) {
|
|
| 15 |
+ const char *p = NULL; |
|
| 16 |
++ const char *v; |
|
| 17 |
+ int r; |
|
| 18 |
+ |
|
| 19 |
+ /* Make this a NOP if IPv6 is not available */ |
|
| 20 |
+@@ -1938,12 +1936,16 @@ |
|
| 21 |
+ if (!link->network) |
|
| 22 |
+ return 0; |
|
| 23 |
+ |
|
| 24 |
++ if (link_ipv6_accept_ra_enabled(link)) |
|
| 25 |
++ v = "1"; |
|
| 26 |
++ else |
|
| 27 |
++ v = "0"; |
|
| 28 |
++ |
|
| 29 |
+ p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/accept_ra");
|
|
| 30 |
+ |
|
| 31 |
+- /* We handle router advertisments ourselves, tell the kernel to GTFO */ |
|
| 32 |
+- r = write_string_file(p, "0", WRITE_STRING_FILE_VERIFY_ON_FAILURE); |
|
| 33 |
++ r = write_string_file(p, v, WRITE_STRING_FILE_VERIFY_ON_FAILURE); |
|
| 34 |
+ if (r < 0) |
|
| 35 |
+- log_link_warning_errno(link, r, "Cannot disable kernel IPv6 accept_ra for interface: %m"); |
|
| 36 |
++ log_link_warning_errno(link, r, "Cannot configure kernel IPv6 accept_ra for interface: %m"); |
|
| 37 |
+ |
|
| 38 |
+ return 0; |
|
| 39 |
+ } |
|
| 40 |
+diff -aur systemd-228/src/network/networkd-ndisc.c systemd-228-1/src/network/networkd-ndisc.c |
|
| 41 |
+--- systemd-228/src/network/networkd-ndisc.c 2015-11-17 23:59:06.000000000 -0800 |
|
| 42 |
+@@ -26,7 +26,7 @@ |
|
| 43 |
+ #include "sd-ndisc.h" |
|
| 44 |
+ |
|
| 45 |
+ #include "networkd-link.h" |
|
| 46 |
+- |
|
| 47 |
++/* |
|
| 48 |
+ static int ndisc_netlink_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata) {
|
|
| 49 |
+ _cleanup_link_unref_ Link *link = userdata; |
|
| 50 |
+ int r; |
|
| 51 |
+@@ -77,7 +77,6 @@ |
|
| 52 |
+ if (in_addr_is_null(AF_INET6, (const union in_addr_union *) &link->network->ipv6_token) == 0) |
|
| 53 |
+ memcpy(((char *)&address->in_addr.in6) + 8, ((char *)&link->network->ipv6_token) + 8, 8); |
|
| 54 |
+ else {
|
|
| 55 |
+- /* see RFC4291 section 2.5.1 */ |
|
| 56 |
+ address->in_addr.in6.__in6_u.__u6_addr8[8] = link->mac.ether_addr_octet[0]; |
|
| 57 |
+ address->in_addr.in6.__in6_u.__u6_addr8[8] ^= 1 << 1; |
|
| 58 |
+ address->in_addr.in6.__in6_u.__u6_addr8[9] = link->mac.ether_addr_octet[1]; |
|
| 59 |
+@@ -140,11 +139,12 @@ |
|
| 60 |
+ |
|
| 61 |
+ link->ndisc_messages ++; |
|
| 62 |
+ } |
|
| 63 |
++*/ |
|
| 64 |
+ |
|
| 65 |
+ static void ndisc_router_handler(sd_ndisc *nd, uint8_t flags, const struct in6_addr *gateway, unsigned lifetime, int pref, void *userdata) {
|
|
| 66 |
+ _cleanup_route_free_ Route *route = NULL; |
|
| 67 |
+ Link *link = userdata; |
|
| 68 |
+- usec_t time_now; |
|
| 69 |
++ /* usec_t time_now; */ |
|
| 70 |
+ int r; |
|
| 71 |
+ |
|
| 72 |
+ assert(link); |
|
| 73 |
+@@ -163,6 +163,8 @@ |
|
| 74 |
+ log_link_warning_errno(link, r, "Starting DHCPv6 client on NDisc request failed: %m"); |
|
| 75 |
+ } |
|
| 76 |
+ |
|
| 77 |
++ return; |
|
| 78 |
++/* |
|
| 79 |
+ if (!gateway) |
|
| 80 |
+ return; |
|
| 81 |
+ |
|
| 82 |
+@@ -189,6 +191,7 @@ |
|
| 83 |
+ } |
|
| 84 |
+ |
|
| 85 |
+ link->ndisc_messages ++; |
|
| 86 |
++*/ |
|
| 87 |
+ } |
|
| 88 |
+ |
|
| 89 |
+ static void ndisc_handler(sd_ndisc *nd, int event, void *userdata) {
|
|
| 90 |
+@@ -242,8 +245,8 @@ |
|
| 91 |
+ |
|
| 92 |
+ r = sd_ndisc_set_callback(link->ndisc_router_discovery, |
|
| 93 |
+ ndisc_router_handler, |
|
| 94 |
+- ndisc_prefix_onlink_handler, |
|
| 95 |
+- ndisc_prefix_autonomous_handler, |
|
| 96 |
++ NULL, |
|
| 97 |
++ NULL, |
|
| 98 |
+ ndisc_handler, |
|
| 99 |
+ link); |
|
| 100 |
+ |
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
Summary: Systemd-228 |
| 2 | 2 |
Name: systemd |
| 3 | 3 |
Version: 228 |
| 4 |
-Release: 19%{?dist}
|
|
| 4 |
+Release: 20%{?dist}
|
|
| 5 | 5 |
License: LGPLv2+ and GPLv2+ and MIT |
| 6 | 6 |
URL: http://www.freedesktop.org/wiki/Software/systemd/ |
| 7 | 7 |
Group: System Environment/Security |
| ... | ... |
@@ -20,12 +20,13 @@ Patch4: systemd-228-parse-error-message.patch |
| 20 | 20 |
Patch5: systemd-228-networking-fixes.patch |
| 21 | 21 |
Patch6: systemd-228-cleanup-recv.patch |
| 22 | 22 |
Patch7: systemd-228-fix-reading-routes.patch |
| 23 |
-Patch8: systemd-228-ipv6-disabled-fix.patch |
|
| 23 |
+Patch8: systemd-228-kernel-ndisc.patch |
|
| 24 | 24 |
Patch9: systemd-228-swap-disconnect-order-fix.patch |
| 25 | 25 |
Patch10: systemd-228-duid-iaid-dhcp-preserve.patch |
| 26 | 26 |
Patch11: systemd-228-timedatectl-PR2749.patch |
| 27 | 27 |
Patch12: systemd-228-query-duid.patch |
| 28 | 28 |
Patch13: systemd-228-pam-systemd-user.patch |
| 29 |
+Patch14: systemd-228-ipv6-disabled-fix.patch |
|
| 29 | 30 |
Requires: Linux-PAM |
| 30 | 31 |
Requires: libcap |
| 31 | 32 |
Requires: xz |
| ... | ... |
@@ -72,6 +73,7 @@ sed -i "s:blkid/::" $(grep -rl "blkid/blkid.h") |
| 72 | 72 |
%patch11 -p1 |
| 73 | 73 |
%patch12 -p1 |
| 74 | 74 |
%patch13 -p1 |
| 75 |
+%patch14 -p1 |
|
| 75 | 76 |
sed -i "s#\#DefaultTasksMax=512#DefaultTasksMax=infinity#g" src/core/system.conf |
| 76 | 77 |
|
| 77 | 78 |
%build |
| ... | ... |
@@ -140,15 +142,17 @@ rm -rf %{buildroot}/*
|
| 140 | 140 |
%dir %{_localstatedir}/log/journal
|
| 141 | 141 |
|
| 142 | 142 |
%changelog |
| 143 |
+* Tue May 17 2016 Anish Swaminathan <anishs@vmware.com> 228-20 |
|
| 144 |
+- Added patch for letting kernel handle ndisc |
|
| 143 | 145 |
* Tue May 17 2016 Divya Thaluru <dthaluru@vmware.com> 228-19 |
| 144 | 146 |
- Updated systemd-user PAM configuration |
| 145 |
-* Mon May 12 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 228-18 |
|
| 147 |
+* Mon May 16 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 228-18 |
|
| 146 | 148 |
- Updated the MaxTasks to infinity in system.conf file |
| 147 | 149 |
* Thu Apr 21 2016 Mahmoud Bassiouny <mbassiouny@vmware.com> 228-17 |
| 148 | 150 |
- Set the default.target to the multi-user.target |
| 149 | 151 |
* Tue Apr 12 2016 Vinay Kulkarni <kulkarniv@vmware.com> 228-16 |
| 150 | 152 |
- Disable network interface renaming. |
| 151 |
-* Wed Mar 31 2016 Vinay Kulkarni <kulkarniv@vmware.com> 228-15 |
|
| 153 |
+* Thu Mar 31 2016 Vinay Kulkarni <kulkarniv@vmware.com> 228-15 |
|
| 152 | 154 |
- Patch to query DHCP DUID, IAID.f |
| 153 | 155 |
* Wed Mar 30 2016 Vinay Kulkarni <kulkarniv@vmware.com> 228-14 |
| 154 | 156 |
- Update DHCP DUID, IAID configuration patch. |