[issue30430] Cannot write to a tun interface file
Rémy Léone
report at bugs.python.org
Mon May 22 11:11:54 EDT 2017
Rémy Léone added the comment:
The question I'm the most interested about is why depending on what the bytes object contains I get a different result. In one case the bytes are written fine to the TUN interface file descriptor and in the other case I get an Errno22. My assumption is that the bytes to write are completely opaque for Python.
My current workaround is mainly to start the bytes I want to send to my tun interface with a non-0 byte.
Something strange that I have also noticed using strace python simple_incorrect.py is that I get EINVAL errors in the second case while I didn't change the mode with which I open the tun.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30430>
_______________________________________
More information about the Python-bugs-list
mailing list