This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Rémy Léone, neologix, pitrou
Date 2017-05-22.15:19:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495466399.58.0.528977376744.issue30430@psf.upfronthosting.co.za>
In-reply-to
Content
I know nothing about TUN but you may simply be hitting this code path:
https://github.com/spotify/linux/blob/master/drivers/net/tun.c#L601-L614

Since:
>>> ('e'.encode()[0] & 0xf0) in (0x40, 0x60)
True
>>> ('é'.encode()[0] & 0xf0) in (0x40, 0x60)
False

writing 'é'.encode() will hit the EINVAL-returning path.  The bottom line is that TUN devices don't seem to support free-form data, but expect a certain format.
History
Date User Action Args
2017-05-22 15:19:59pitrousetrecipients: + pitrou, neologix, Rémy Léone
2017-05-22 15:19:59pitrousetmessageid: <1495466399.58.0.528977376744.issue30430@psf.upfronthosting.co.za>
2017-05-22 15:19:59pitroulinkissue30430 messages
2017-05-22 15:19:59pitroucreate