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
Ivan Tyagov
slapos.core
Commits
6a37f505
Commit
6a37f505
authored
7 years ago
by
Tomáš Peterka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disallow attaching non-bridges already in the constructor
parent
457e14c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
slapos/format.py
slapos/format.py
+2
-2
No files found.
slapos/format.py
View file @
6a37f505
...
...
@@ -940,7 +940,7 @@ class Interface(object):
# Attach to TAP network interface, only if the interface interface does not
# report carrier
_
,
result
=
callAndRead
([
'ip'
,
'addr'
,
'list'
,
self
.
name
],
raise_on_error
=
False
)
self
.
attach_to_tap
=
'DOWN'
in
result
.
split
(
'
\
n
'
,
1
)[
0
]
self
.
attach_to_tap
=
self
.
isBridge
()
and
(
'DOWN'
in
result
.
split
(
'
\
n
'
,
1
)[
0
])
# XXX no __getinitargs__, as instances of this class are never deserialized.
...
...
@@ -1022,7 +1022,7 @@ class Interface(object):
if
self
.
isBridge
():
callAndRead
([
'brctl'
,
'addif'
,
self
.
name
,
tap
.
name
])
else
:
self
.
logger
.
warning
(
"Interface slapos.cfg:interface_name={} is not a bridge."
self
.
logger
.
warning
(
"Interface slapos.cfg:interface_name={} is not a bridge.
"
"TUN/TAP interface {} might not have internet connection."
""
.
format
(
self
.
name
,
tap
.
name
))
...
...
This diff is collapsed.
Click to expand it.
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