Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos.core
Commits
a9f102f7
Commit
a9f102f7
authored
Nov 21, 2022
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapformat: Refactor IPv6 interface fallback
parent
3f78c68f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
slapos/format.py
slapos/format.py
+4
-4
No files found.
slapos/format.py
View file @
a9f102f7
...
...
@@ -973,7 +973,7 @@ class Interface(object):
self
.
_logger
=
logger
self
.
name
=
str
(
name
)
self
.
ipv4_local_network
=
ipv4_local_network
self
.
ipv6_interface
=
ipv6_interface
self
.
ipv6_interface
=
ipv6_interface
or
name
# XXX no __getinitargs__, as instances of this class are never deserialized.
...
...
@@ -996,7 +996,7 @@ class Interface(object):
def
getGlobalScopeAddressList
(
self
,
tap
=
None
):
"""Returns currently configured global scope IPv6 addresses"""
interface_name
=
self
.
ipv6_interface
or
self
.
name
interface_name
=
self
.
ipv6_interface
try
:
address_list
=
[
q
...
...
@@ -1040,7 +1040,7 @@ class Interface(object):
if
ipv6
:
address_string
=
'%s/%s'
%
(
address
,
lenNetmaskIpv6
(
netmask
))
af
=
socket
.
AF_INET6
interface_name
=
self
.
ipv6_interface
or
self
.
name
interface_name
=
self
.
ipv6_interface
else
:
af
=
socket
.
AF_INET
address_string
=
'%s/%s'
%
(
address
,
netmaskToPrefixIPv4
(
netmask
))
...
...
@@ -1148,7 +1148,7 @@ class Interface(object):
NoAddressOnInterface: There's no address on the interface to construct
an address with.
"""
interface_name
=
self
.
ipv6_interface
or
self
.
name
interface_name
=
self
.
ipv6_interface
# Getting one address of the interface as base of the next addresses
interface_addr_list
=
self
.
getGlobalScopeAddressList
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment