[Patches] [ python-Patches-1069624 ] incomplete support for AF_PACKET in socketmodule.c
SourceForge.net
noreply at sourceforge.net
Tue Nov 8 14:47:54 CET 2005
Patches item #1069624, was opened at 2004-11-19 19:00
Message generated for change (Settings changed) made by gustavo
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1069624&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Modules
Group: None
>Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Gustavo J. A. M. Carneiro (gustavo)
Assigned to: Nobody/Anonymous (nobody)
Summary: incomplete support for AF_PACKET in socketmodule.c
Initial Comment:
A comment in the source documents the AF_PACKET address
format:
- an AF_PACKET socket address is a tuple containing a
string
specifying the ethernet interface and an integer
specifying
the Ethernet protocol number to be received. For example:
("eth0",0x1234). Optional 3rd,4th,5th elements in
the tuple
specify packet-type and ha-type/addr -- these are
ignored by
networking code, but accepted since they are returned
by the
getsockname() method.
The part that says "these are ignored by networking
code," is clearly innacurate when comparing with the
packet(7) man page:
"(...)Packets sent through a SOCK_DGRAM packet
socket get a suitable physical layer header based on
the information in the sockaddr_ll destination address
before they are queued.(...)"
Attached patch copies the passed in addr into the
sockaddr structure. It is against Python 2.3.4.
----------------------------------------------------------------------
Comment By: Gustavo J. A. M. Carneiro (gustavo)
Date: 2005-03-26 12:54
Message:
Logged In: YES
user_id=908
Oh, I just noticed this patch (fixed) was committed to CVS
before 2.4/2.5 branching!
Thanks!
Guess this can be closed now...
----------------------------------------------------------------------
Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-03-03 15:23
Message:
Logged In: YES
user_id=1188172
>From the patch:
+ addr->sll_halen = hatype;
+ addr->sll_halen = halen;
This doesn't seem to make sense, so the upper line can be
removed.
Also, you are mixing tabs and spaces.
----------------------------------------------------------------------
Comment By: Gustavo J. A. M. Carneiro (gustavo)
Date: 2004-11-19 19:19
Message:
Logged In: YES
user_id=908
And just now I actually tested this patch. It works! While
before the ethernet frame was sent with broadcast
destination address, now it goes with a correct destination
address. This should go into python 2.3.x as well.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1069624&group_id=5470
More information about the Patches
mailing list