diff --git a/SOURCES/0002-Exclude-39.0.0.0-8-network-from-reserved-set.patch b/SOURCES/0002-Exclude-39.0.0.0-8-network-from-reserved-set.patch new file mode 100644 index 0000000..bea443c --- /dev/null +++ b/SOURCES/0002-Exclude-39.0.0.0-8-network-from-reserved-set.patch @@ -0,0 +1,24 @@ +From e16f1ae5a21fef2a3f7c54fcb5b46235cc8e8137 Mon Sep 17 00:00:00 2001 +From: Andrew Stromnov +Date: Thu, 23 Aug 2012 23:37:55 +0400 +Subject: [PATCH] Exclude 39.0.0.0/8 network from reserved set + +--- + netaddr/ip/__init__.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py +index e4a6b7bfe0e209bb1b1059b8e4b743ca4a4af72a..7a93510b7f9fde1bd94757c50f9e7b0ac6463fbf 100644 +--- a/netaddr/ip/__init__.py ++++ b/netaddr/ip/__init__.py +@@ -1918,7 +1918,6 @@ IPV4_MULTICAST = IPNetwork('224.0.0.0/4') + IPV4_6TO4 = IPNetwork('192.88.99.0/24') # 6to4 Relay Anycast + + IPV4_RESERVED = ( +- IPNetwork('39.0.0.0/8'), # Reserved but subject to allocation + IPNetwork('128.0.0.0/16'), # Reserved but subject to allocation + IPNetwork('191.255.0.0/16'), # Reserved but subject to allocation + IPNetwork('192.0.0.0/24'), # Reserved but subject to allocation +-- +2.9.5 + diff --git a/SOURCES/0003-Adapt-IPV4_RESERVED-according-to-RFC-5735-Appendix-A.patch b/SOURCES/0003-Adapt-IPV4_RESERVED-according-to-RFC-5735-Appendix-A.patch new file mode 100644 index 0000000..102e689 --- /dev/null +++ b/SOURCES/0003-Adapt-IPV4_RESERVED-according-to-RFC-5735-Appendix-A.patch @@ -0,0 +1,27 @@ +From 1756e8988328036393de44cf20571b6513fa1143 Mon Sep 17 00:00:00 2001 +From: nordhausen +Date: Fri, 28 Feb 2014 14:22:20 +0100 +Subject: [PATCH] Adapt IPV4_RESERVED according to RFC 5735 Appendix A + +--- + netaddr/ip/__init__.py | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py +index 7a93510b7f9fde1bd94757c50f9e7b0ac6463fbf..200753d9e73ecfad530044ce30e166b17d63b81c 100644 +--- a/netaddr/ip/__init__.py ++++ b/netaddr/ip/__init__.py +@@ -1918,10 +1918,7 @@ IPV4_MULTICAST = IPNetwork('224.0.0.0/4') + IPV4_6TO4 = IPNetwork('192.88.99.0/24') # 6to4 Relay Anycast + + IPV4_RESERVED = ( +- IPNetwork('128.0.0.0/16'), # Reserved but subject to allocation +- IPNetwork('191.255.0.0/16'), # Reserved but subject to allocation + IPNetwork('192.0.0.0/24'), # Reserved but subject to allocation +- IPNetwork('223.255.255.0/24'), # Reserved but subject to allocation + IPNetwork('240.0.0.0/4'), # Reserved for Future Use + + # Reserved multicast +-- +2.9.5 + diff --git a/SOURCES/0004-Add-range-from-RFC-6598.patch b/SOURCES/0004-Add-range-from-RFC-6598.patch new file mode 100644 index 0000000..5cb8835 --- /dev/null +++ b/SOURCES/0004-Add-range-from-RFC-6598.patch @@ -0,0 +1,24 @@ +From 56d1a1a64a5f8159a127086a1f04dd7f6db5862d Mon Sep 17 00:00:00 2001 +From: Kyle Maxwell +Date: Tue, 24 Feb 2015 14:46:34 -0600 +Subject: [PATCH] Add range from RFC 6598 + +--- + netaddr/ip/__init__.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py +index 200753d9e73ecfad530044ce30e166b17d63b81c..d5be23f9f4bfba1ec6c2c323418d535c0c8fdef1 100644 +--- a/netaddr/ip/__init__.py ++++ b/netaddr/ip/__init__.py +@@ -1905,6 +1905,7 @@ IPV4_LOOPBACK = IPNetwork('127.0.0.0/8') + + IPV4_PRIVATE = ( + IPNetwork('10.0.0.0/8'), # Private-Use Networks ++ IPNetwork('100.64.0.0/10'), # Shared address space + IPNetwork('172.16.0.0/12'), # Private-Use Networks + IPNetwork('192.0.2.0/24'), # Test-Net + IPNetwork('192.168.0.0/16'), # Private-Use Networks +-- +2.9.5 + diff --git a/SOURCES/0005-Add-range-from-RFC-6890.patch b/SOURCES/0005-Add-range-from-RFC-6890.patch new file mode 100644 index 0000000..c580d8f --- /dev/null +++ b/SOURCES/0005-Add-range-from-RFC-6890.patch @@ -0,0 +1,24 @@ +From 163fe0eb38e56cfcfff01d1a940322af2bd86a87 Mon Sep 17 00:00:00 2001 +From: Kyle Maxwell +Date: Tue, 24 Feb 2015 14:49:09 -0600 +Subject: [PATCH] Add range from RFC 6890 + +--- + netaddr/ip/__init__.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py +index d5be23f9f4bfba1ec6c2c323418d535c0c8fdef1..c0bbbb563f6a03447dc7a7d6ce754dabcc499349 100644 +--- a/netaddr/ip/__init__.py ++++ b/netaddr/ip/__init__.py +@@ -1907,6 +1907,7 @@ IPV4_PRIVATE = ( + IPNetwork('10.0.0.0/8'), # Private-Use Networks + IPNetwork('100.64.0.0/10'), # Shared address space + IPNetwork('172.16.0.0/12'), # Private-Use Networks ++ IPNetwork('192.0.0.0/24'), # Test-Net + IPNetwork('192.0.2.0/24'), # Test-Net + IPNetwork('192.168.0.0/16'), # Private-Use Networks + IPRange('239.0.0.0', '239.255.255.255'), # Administrative Multicast +-- +2.9.5 + diff --git a/SOURCES/0006-Add-range-from-RFC-2544.patch b/SOURCES/0006-Add-range-from-RFC-2544.patch new file mode 100644 index 0000000..86259f2 --- /dev/null +++ b/SOURCES/0006-Add-range-from-RFC-2544.patch @@ -0,0 +1,24 @@ +From 4e64cbe22f61dc0aa9ef61b89975565440079aa1 Mon Sep 17 00:00:00 2001 +From: Kyle Maxwell +Date: Tue, 24 Feb 2015 14:51:36 -0600 +Subject: [PATCH] Add range from RFC 2544 + +--- + netaddr/ip/__init__.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py +index c0bbbb563f6a03447dc7a7d6ce754dabcc499349..5a6bd6b7812cf1d632cfbe80d1541dfcb72662de 100644 +--- a/netaddr/ip/__init__.py ++++ b/netaddr/ip/__init__.py +@@ -1910,6 +1910,7 @@ IPV4_PRIVATE = ( + IPNetwork('192.0.0.0/24'), # Test-Net + IPNetwork('192.0.2.0/24'), # Test-Net + IPNetwork('192.168.0.0/16'), # Private-Use Networks ++ IPNetwork('198.18.0.0/15'), # Benchmarking + IPRange('239.0.0.0', '239.255.255.255'), # Administrative Multicast + ) + +-- +2.9.5 + diff --git a/SOURCES/0007-Add-range-from-RFC-5737.patch b/SOURCES/0007-Add-range-from-RFC-5737.patch new file mode 100644 index 0000000..ea6ec2a --- /dev/null +++ b/SOURCES/0007-Add-range-from-RFC-5737.patch @@ -0,0 +1,25 @@ +From 400bba0ccafeb0de1148992df65f1dd6cdb0b3d8 Mon Sep 17 00:00:00 2001 +From: Kyle Maxwell +Date: Tue, 24 Feb 2015 14:53:26 -0600 +Subject: [PATCH] Add range from RFC 5737 + +--- + netaddr/ip/__init__.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py +index 5a6bd6b7812cf1d632cfbe80d1541dfcb72662de..ac600121c161b147ca8df2db054272e37af79fb7 100644 +--- a/netaddr/ip/__init__.py ++++ b/netaddr/ip/__init__.py +@@ -1911,6 +1911,8 @@ IPV4_PRIVATE = ( + IPNetwork('192.0.2.0/24'), # Test-Net + IPNetwork('192.168.0.0/16'), # Private-Use Networks + IPNetwork('198.18.0.0/15'), # Benchmarking ++ IPNetwork('198.51.100.0/24'), # Examples for documentation ++ IPNetwork('203.0.113.0/24'), # Examples for documentation + IPRange('239.0.0.0', '239.255.255.255'), # Administrative Multicast + ) + +-- +2.9.5 + diff --git a/SOURCES/0008-Move-some-from-IPV4_PRIVATE-to-IPV4_RESERVED.patch b/SOURCES/0008-Move-some-from-IPV4_PRIVATE-to-IPV4_RESERVED.patch new file mode 100644 index 0000000..9d2b5d5 --- /dev/null +++ b/SOURCES/0008-Move-some-from-IPV4_PRIVATE-to-IPV4_RESERVED.patch @@ -0,0 +1,39 @@ +From 71349fb5b1bf67769d07fc7eca1922fb258722a9 Mon Sep 17 00:00:00 2001 +From: Kyle Maxwell +Date: Tue, 24 Feb 2015 14:58:38 -0600 +Subject: [PATCH] Move some from IPV4_PRIVATE to IPV4_RESERVED + +--- + netaddr/ip/__init__.py | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py +index ac600121c161b147ca8df2db054272e37af79fb7..0f7a93e22c3f8d63842fd6cecedabd6564d711b3 100644 +--- a/netaddr/ip/__init__.py ++++ b/netaddr/ip/__init__.py +@@ -1907,12 +1907,8 @@ IPV4_PRIVATE = ( + IPNetwork('10.0.0.0/8'), # Private-Use Networks + IPNetwork('100.64.0.0/10'), # Shared address space + IPNetwork('172.16.0.0/12'), # Private-Use Networks +- IPNetwork('192.0.0.0/24'), # Test-Net + IPNetwork('192.0.2.0/24'), # Test-Net + IPNetwork('192.168.0.0/16'), # Private-Use Networks +- IPNetwork('198.18.0.0/15'), # Benchmarking +- IPNetwork('198.51.100.0/24'), # Examples for documentation +- IPNetwork('203.0.113.0/24'), # Examples for documentation + IPRange('239.0.0.0', '239.255.255.255'), # Administrative Multicast + ) + +@@ -1925,6 +1921,9 @@ IPV4_6TO4 = IPNetwork('192.88.99.0/24') # 6to4 Relay Anycast + IPV4_RESERVED = ( + IPNetwork('192.0.0.0/24'), # Reserved but subject to allocation + IPNetwork('240.0.0.0/4'), # Reserved for Future Use ++ IPNetwork('198.18.0.0/15'), # Benchmarking ++ IPNetwork('198.51.100.0/24'), # Examples for documentation ++ IPNetwork('203.0.113.0/24'), # Examples for documentation + + # Reserved multicast + IPRange('234.0.0.0', '238.255.255.255'), +-- +2.9.5 + diff --git a/SOURCES/0009-Fixed-71.-Updated-IPv4-reserved-networks.patch b/SOURCES/0009-Fixed-71.-Updated-IPv4-reserved-networks.patch new file mode 100644 index 0000000..b8f660a --- /dev/null +++ b/SOURCES/0009-Fixed-71.-Updated-IPv4-reserved-networks.patch @@ -0,0 +1,66 @@ +From 03668eda9ccb4be25fd7b3962975397eff44bfe5 Mon Sep 17 00:00:00 2001 +From: David Moss +Date: Thu, 27 Aug 2015 08:01:02 +0100 +Subject: [PATCH] - Fixed #71. Updated IPv4 reserved networks. + +--- + netaddr/ip/__init__.py | 28 +++++++++++++++------------- + 1 file changed, 15 insertions(+), 13 deletions(-) + +diff --git a/netaddr/ip/__init__.py b/netaddr/ip/__init__.py +index 0f7a93e22c3f8d63842fd6cecedabd6564d711b3..5537f5fec94016a17f9ef653f940fb8ea95a2365 100644 +--- a/netaddr/ip/__init__.py ++++ b/netaddr/ip/__init__.py +@@ -1901,14 +1901,15 @@ def all_matching_cidrs(ip, cidrs): + #----------------------------------------------------------------------------- + # Cached IPv4 address range lookups. + #----------------------------------------------------------------------------- +-IPV4_LOOPBACK = IPNetwork('127.0.0.0/8') ++IPV4_LOOPBACK = IPNetwork('127.0.0.0/8') # Loopback addresses (RFC 990) + + IPV4_PRIVATE = ( +- IPNetwork('10.0.0.0/8'), # Private-Use Networks +- IPNetwork('100.64.0.0/10'), # Shared address space +- IPNetwork('172.16.0.0/12'), # Private-Use Networks +- IPNetwork('192.0.2.0/24'), # Test-Net +- IPNetwork('192.168.0.0/16'), # Private-Use Networks ++ IPNetwork('10.0.0.0/8'), # Class A private network local communication (RFC 1918) ++ IPNetwork('100.64.0.0/10'), # Carrier grade NAT (RFC 6598) ++ IPNetwork('172.16.0.0/12'), # Private network - local communication (RFC 1918) ++ IPNetwork('192.0.0.0/24'), # IANA IPv4 Special Purpose Address Registry (RFC 5736) ++ IPNetwork('192.168.0.0/16'), # Class B private network local communication (RFC 1918) ++ IPNetwork('198.18.0.0/15'), # Testing of inter-network communications between subnets (RFC 2544) + IPRange('239.0.0.0', '239.255.255.255'), # Administrative Multicast + ) + +@@ -1916,19 +1917,20 @@ IPV4_LINK_LOCAL = IPNetwork('169.254.0.0/16') + + IPV4_MULTICAST = IPNetwork('224.0.0.0/4') + +-IPV4_6TO4 = IPNetwork('192.88.99.0/24') # 6to4 Relay Anycast ++IPV4_6TO4 = IPNetwork('192.88.99.0/24') # 6to4 anycast relays (RFC 3068) + + IPV4_RESERVED = ( +- IPNetwork('192.0.0.0/24'), # Reserved but subject to allocation +- IPNetwork('240.0.0.0/4'), # Reserved for Future Use +- IPNetwork('198.18.0.0/15'), # Benchmarking +- IPNetwork('198.51.100.0/24'), # Examples for documentation +- IPNetwork('203.0.113.0/24'), # Examples for documentation ++ IPNetwork('0.0.0.0/8'), # Broadcast message (RFC 1700) ++ IPNetwork('192.0.2.0/24'), # TEST-NET examples and documentation (RFC 5737) ++ IPNetwork('240.0.0.0/4'), # Reserved for multicast assignments (RFC 5771) ++ IPNetwork('198.51.100.0/24'), # TEST-NET-2 examples and documentation (RFC 5737) ++ IPNetwork('203.0.113.0/24'), # TEST-NET-3 examples and documentation (RFC 5737) + + # Reserved multicast ++ IPNetwork('233.252.0.0/24'), # Multicast test network + IPRange('234.0.0.0', '238.255.255.255'), + IPRange('225.0.0.0', '231.255.255.255'), +-) ++) + (IPV4_LOOPBACK, IPV4_6TO4) + + #----------------------------------------------------------------------------- + # Cached IPv6 address range lookups. +-- +2.9.5 + diff --git a/SPECS/python-netaddr.spec b/SPECS/python-netaddr.spec index 39d2a2f..2972cc6 100644 --- a/SPECS/python-netaddr.spec +++ b/SPECS/python-netaddr.spec @@ -4,7 +4,7 @@ Name: python-netaddr Version: 0.7.5 -Release: 7%{?dist} +Release: 9%{?dist} Summary: A pure Python network address representation and manipulation library Group: Development/Libraries @@ -17,6 +17,14 @@ BuildArch: noarch BuildRequires: python-devel >= 2.4 Patch0: 0001-Fixed-github-Issue-no.-2.-Thanks-keesbos.patch +Patch1: 0002-Exclude-39.0.0.0-8-network-from-reserved-set.patch +Patch2: 0003-Adapt-IPV4_RESERVED-according-to-RFC-5735-Appendix-A.patch +Patch3: 0004-Add-range-from-RFC-6598.patch +Patch4: 0005-Add-range-from-RFC-6890.patch +Patch5: 0006-Add-range-from-RFC-2544.patch +Patch6: 0007-Add-range-from-RFC-5737.patch +Patch7: 0008-Move-some-from-IPV4_PRIVATE-to-IPV4_RESERVED.patch +Patch8: 0009-Fixed-71.-Updated-IPv4-reserved-networks.patch %description @@ -50,7 +58,16 @@ API documentation for the latest release is available here :- %prep %setup -q -n netaddr-%{version} + %patch0 -p1 -b .invalid_ip_network +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 # Make rpmlint happy, get rid of DOS line endings %{__sed} -i 's/\r//' netaddr/*.py @@ -89,6 +106,13 @@ rm -rf %{buildroot} %{_bindir}/netaddr %changelog +* Thu Nov 2 2017 Pavel Vomacka - 0.7.5-9 +- Adding commands to apply new patches added in previous release 0.7.5-8 + +* Fri Oct 20 2017 Pavel Vomacka - 0.7.5-8 +- Resolves: #1438668 DNS forwarder address added during IPA installation + shouldn't add IP-Address '0.0.0.0' + * Fri Dec 27 2013 Daniel Mach - 0.7.5-7 - Mass rebuild 2013-12-27