1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

python3: ipaddress is now part of the standard library (removing python-ipaddr)

IPNetwork doesn't exists anymore and is replaced by ip_network. IPv?Network (4 and 6)
objects take an optional argument "strict" that defaults to True. If strict is set
and the ip address has the host bit set it will raise an exception. This is bad
for ifupdown2, so we need to replace all calls to IPNetwork and IPv?Network with
function who will set strict to False. That way we can limit the number of changes
for this patch.

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
Julien Fortin
2019-12-17 17:27:51 +01:00
parent 964e8e5c2f
commit 5dded70eaa
10 changed files with 85 additions and 26 deletions

View File

@@ -26,7 +26,7 @@
#
from collections import OrderedDict
from ipaddr import IPv4Address, IPv6Address
from ipaddress import IPv4Address, IPv6Address
from .nlpacket import *
from select import select
from struct import pack, unpack