Bugs item #730222, was opened at 2003-04-30 12:00
Message generated for change (Settings changed) made by facundobatista
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=730222&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: Python Library
Group: Python 2.2.2
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: John Marshall (john_marshall)
Assigned to: Nobody/Anonymous (nobody)
Summary: socketmodule.c: inet_pton() expects 4-byte packed_addr
Initial Comment:
In the Modules/socketmodule.c file, the inet_pton function
implicitly treats "long packed_addr" as a 4-byte object or
expects that the required 4-bytes is at
&packed_addr[0]-[3]. This is not true under
SUPER-UX/SX. In order to get this working right, I
changed the data type from "long" to "int". This now
works properly.
-----Modules/socketmodule.c: #3825
/* 042303; JM; this routine really expects a 4-byte
packed_addr
* not a long; long on SX is 8-bytes! */
#if SX
int packed_addr;
#else
long packed_addr;
#endif
...
if (packed_addr == INADDR_NONE)
return 0;
memcpy(dst, &packed_addr, 4);
-----
----------------------------------------------------------------------
Comment By: Facundo Batista (facundobatista)
Date: 2005-05-30 15:57
Message:
Logged In: YES
user_id=752496
Deprecated. Reopen only if still happens in 2.3 or newer.
. Facundo
----------------------------------------------------------------------
Comment By: John Marshall (john_marshall)
Date: 2005-01-17 12:52
Message:
Logged In: YES
user_id=768577
I no longer have access to SUPER-UX/SX systems, but
the problem must still exist since nothing has changed
in the source (I just checked that "long packed_addr"
is still used -- SUPER-UX/SX systems support 8-byte
longs).
The more general patch supplied by nnorwitz should
do the trick, though.
Thanks,
John
----------------------------------------------------------------------
Comment By: Facundo Batista (facundobatista)
Date: 2005-01-15 15:04
Message:
Logged In: YES
user_id=752496
This patch is no applied, the bug persists?
----------------------------------------------------------------------
Comment By: Facundo Batista (facundobatista)
Date: 2005-01-15 15:04
Message:
Logged In: YES
user_id=752496
Please, could you verify if this problem persists in Python 2.3.4
or 2.4?
If yes, in which version? Can you provide a test case?
If the problem is solved, from which version?
Note that if you fail to answer in one month, I'll close this bug
as "Won't fix".
Thank you!
. Facundo
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-05-22 00:32
Message:
Logged In: YES
user_id=33168
Attached is a patch which should fix the problem. There was
one other place that needed to be changed. This change is
more generic. Let me know if it works for you.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=730222&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com