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 mturon
Recipients mturon
Date 2016-10-27.18:14:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1477592098.82.0.815527711646.issue28545@psf.upfronthosting.co.za>
In-reply-to
Content
When binding to AF_PACKET linux kernel sockets, the interface name is not passed in when given -- it is always "".  This causes problems, for example, receiving packets to a "monitor0" interface doesn't work.

diff -r a6548e230ed6 Modules/socketmodule.c
--- a/Modules/socketmodule.c    Thu Oct 27 19:33:22 2016 +0300
+++ b/Modules/socketmodule.c    Thu Oct 27 11:13:12 2016 -0700
@@ -1344,6 +1344,7 @@
     {
         struct sockaddr_ll *a = (struct sockaddr_ll *)addr;
         char *ifname = "";
+        // ^^ ifname should be set to interface name passed in via sockaddr.
         struct ifreq ifr;
         /* need to look up interface name give index */
         if (a->sll_ifindex) {
History
Date User Action Args
2016-10-27 18:14:58mturonsetrecipients: + mturon
2016-10-27 18:14:58mturonsetmessageid: <1477592098.82.0.815527711646.issue28545@psf.upfronthosting.co.za>
2016-10-27 18:14:58mturonlinkissue28545 messages
2016-10-27 18:14:58mturoncreate