git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
systematic use of context managers for dealing with files instead of open()/close...
[nepi.git]
/
src
/
nepi
/
resources
/
linux
/
scripts
/
linux-tap-create.py
diff --git
a/src/nepi/resources/linux/scripts/linux-tap-create.py
b/src/nepi/resources/linux/scripts/linux-tap-create.py
index
bd14cee
..
5792e7d
100644
(file)
--- a/
src/nepi/resources/linux/scripts/linux-tap-create.py
+++ b/
src/nepi/resources/linux/scripts/linux-tap-create.py
@@
-140,6
+140,7
@@
def create_tap(vif_name, vif_type, pi):
if not pi:
flags |= IFF_NO_PI
+ # xxx : Thierry : not quite sure where this gets closed
fd = os.open("/dev/net/tun", os.O_RDWR)
ifreq = struct.pack("16sH", vif_name, flags)