Patch to fix nameserver IPv6 issue

e9
David Murphy 8 years ago
parent 01dcdd2a92
commit 67ce675c37

@ -0,0 +1,43 @@
diff -ur a/salt/grains/core.py b/salt/grains/core.py
--- a/salt/grains/core.py 2017-05-15 13:04:13.484215822 -0600
+++ b/salt/grains/core.py 2017-05-15 13:08:08.626518175 -0600
@@ -1678,14 +1678,10 @@
ret = {}
ret['ipv4'] = salt.utils.network.ip_addrs(include_loopback=True)
- _fqdn = hostname()['fqdn']
- sockets = [(socket.AF_INET, '4')]
-
- if __opts__.get('ipv6', True):
- ret['ipv6'] = salt.utils.network.ip_addrs6(include_loopback=True)
- sockets.append((socket.AF_INET6, '6'))
+ ret['ipv6'] = salt.utils.network.ip_addrs6(include_loopback=True)
- for socket_type, ipv_num in sockets:
+ _fqdn = hostname()['fqdn']
+ for socket_type, ipv_num in ((socket.AF_INET, '4'), (socket.AF_INET6, '6')):
key = 'fqdn_ip' + ipv_num
if not ret['ipv' + ipv_num]:
ret[key] = []
@@ -1763,7 +1759,7 @@
# Provides:
# ip_interfaces
- if salt.utils.is_proxy() or not __opts__.get('ipv6', True):
+ if salt.utils.is_proxy():
return {}
ret = {}
@@ -1807,10 +1803,8 @@
return {}
resolv = salt.utils.dns.parse_resolv()
- keys = ['nameservers', 'ip4_nameservers', 'sortlist']
- if __opts__.get('ipv6', True):
- keys.append('ip6_nameservers')
- for key in keys:
+ for key in ('nameservers', 'ip4_nameservers', 'ip6_nameservers',
+ 'sortlist'):
if key in resolv:
resolv[key] = [str(i) for i in resolv[key]]

@ -39,7 +39,7 @@
Name: salt
Version: 2016.11.5
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A parallel remote execution system
Group: System Environment/Daemons
@ -70,6 +70,7 @@ Source21: salt-syndic.fish
Source22: %{name}-proxy@.service
## Patch0: salt-%%{version}-tests.patch
Patch0: salt-%{version}-fix-nameserver.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -138,11 +139,15 @@ Requires: python27-PyYAML
Requires: python%{?__python_ver}
Requires: python%{?__python_ver}-crypto >= 2.6.1
%else
## %%if (0%%{?rhel} >= 6 && 0%%{__isa_bits} == 64)
## Requires: python2-pycryptodomex >= 3.4.3
## %%else
%if 0%{?fedora} >= 1
Requires: python-crypto >= 2.6.1
## %endif
%else
%if ( 0%{?rhel} >= 6 && 0%{__isa_bits} == 64 )
Requires: python2-pycryptodomex >= 3.4.3
%else
Requires: python-crypto >= 2.6.1
%endif
%endif
Requires: PyYAML
%endif
@ -258,7 +263,7 @@ of an agent (salt-minion) service.
%setup -q -T -D -a 1
cd %{name}-%{version}
## %%patch0 -p1
%patch0 -p1
%build
@ -629,6 +634,9 @@ rm -rf %{buildroot}
%endif
%changelog
* Mon May 15 2017 SaltStack Packaging Team <packaging@saltstack.com> - 2016.11.5-3
- Add patch for Fix ipv6 nameserver grains #41244
* Wed May 10 2017 SaltStack Packaging Team <packaging@saltstack.com> - 2016.11.5-2
- Commented out check for pycryptodomex on Fedora

Loading…
Cancel
Save