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
a5f1257f
Commit
a5f1257f
authored
Oct 19, 2010
by
Martín Ferrari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some dead code
parent
ad450a2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
src/netns/iproute.py
src/netns/iproute.py
+2
-8
No files found.
src/netns/iproute.py
View file @
a5f1257f
...
@@ -915,8 +915,6 @@ def create_tap(iface, use_pi = False):
...
@@ -915,8 +915,6 @@ def create_tap(iface, use_pi = False):
mode |= IFF_NO_PI
mode |= IFF_NO_PI
fd = os.open("/dev/net/tun", os.O_RDWR)
fd = os.open("/dev/net/tun", os.O_RDWR)
if fd == -1:
raise RuntimeError("Could not open /dev/net/tun")
err = fcntl.ioctl(fd, TUNSETIFF, struct.pack("16sH", iface.name, mode))
err = fcntl.ioctl(fd, TUNSETIFF, struct.pack("16sH", iface.name, mode))
if err < 0:
if err < 0:
...
@@ -926,12 +924,8 @@ def create_tap(iface, use_pi = False):
...
@@ -926,12 +924,8 @@ def create_tap(iface, use_pi = False):
try:
try:
set_if(iface)
set_if(iface)
except:
except:
(t, v, bt) = sys.exc_info()
os.close(fd)
try:
raise
os.close(fd)
except:
pass
raise t, v, bt
interfaces = get_if_data()[1]
interfaces = get_if_data()[1]
return interfaces[iface.name], fd
return interfaces[iface.name], fd
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