Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
bcc
Commits
df73a828
Commit
df73a828
authored
9 years ago
by
Yonghong Song
Browse files
Options
Download
Email Patches
Plain Diff
close ipr to avoid fd leak
Signed-off-by:
Yonghong Song
<
yhs@plumgrid.com
>
parent
83f800f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
examples/simulation.py
examples/simulation.py
+1
-0
No files found.
examples/simulation.py
View file @
df73a828
...
...
@@ -50,6 +50,7 @@ class Simulation(object):
# delete the potentially leaf-over veth interfaces
ipr
=
IPRoute
()
for
i
in
ipr
.
link_lookup
(
ifname
=
'%sa'
%
ifc_base_name
):
ipr
.
link_remove
(
i
)
ipr
.
close
()
try
:
out_ifc
=
self
.
ipdb
.
create
(
ifname
=
"%sa"
%
ifc_base_name
,
kind
=
"veth"
,
peer
=
"%sb"
%
ifc_base_name
).
commit
()
...
...
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