Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nemu3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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
nexedi
nemu3
Commits
c713490e
Commit
c713490e
authored
Aug 05, 2010
by
Martín Ferrari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipv6 config stuff
parent
7aa476a2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
src/netns/interface.py
src/netns/interface.py
+4
-0
src/netns/node.py
src/netns/node.py
+2
-1
No files found.
src/netns/interface.py
View file @
c713490e
...
@@ -47,6 +47,10 @@ class NSInterface(Interface):
...
@@ -47,6 +47,10 @@ class NSInterface(Interface):
def
__init__
(
self
,
node
,
index
):
def
__init__
(
self
,
node
,
index
):
super
(
NSInterface
,
self
).
__init__
(
index
)
super
(
NSInterface
,
self
).
__init__
(
index
)
self
.
_slave
=
node
.
_slave
self
.
_slave
=
node
.
_slave
# Disable auto-configuration
# you wish: need to take into account the nonetns mode; plus not
# touching some pre-existing ifaces
#node.system(['/sbin/sysctl', '-w', 'net.ipv6.conf.%s.autoconf=0' % self.name])
node
.
_add_interface
(
self
)
node
.
_add_interface
(
self
)
# some black magic to automatically get/set interface attributes
# some black magic to automatically get/set interface attributes
...
...
src/netns/node.py
View file @
c713490e
...
@@ -162,7 +162,8 @@ def _start_child(debug, nonetns):
...
@@ -162,7 +162,8 @@ def _start_child(debug, nonetns):
unshare
.
unshare
(
unshare
.
CLONE_NEWNET
)
unshare
.
unshare
(
unshare
.
CLONE_NEWNET
)
# Enable packet forwarding
# Enable packet forwarding
netns
.
iproute
.
_execute
([
'sysctl'
,
'-w'
,
'net.ipv4.ip_forward=1'
])
netns
.
iproute
.
_execute
([
'sysctl'
,
'-w'
,
'net.ipv4.ip_forward=1'
])
# FIXME: ipv6?
netns
.
iproute
.
_execute
([
'sysctl'
,
'-w'
,
'net.ipv6.conf.default.forwarding=1'
])
srv
.
run
()
srv
.
run
()
except
BaseException
,
e
:
except
BaseException
,
e
:
s
=
"Slave node aborting: %s
\
n
"
%
str
(
e
)
s
=
"Slave node aborting: %s
\
n
"
%
str
(
e
)
...
...
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