2.6.7: Does socket.gethostbyaddr truncate?
On 2018-01-30 08:56:16 -0800, Dan Stromberg wrote:
> dig -x should return a single PTR in all cases, shouldn't it?
No. dig -x should return *all* PTR records. There is usually at most one
of them, but there may be several. (46 seems a bit much, but there
really isn't any limit).
> What IP are you using?
Yup. I want to see an address with 46 PTR records, too ;-).
> On Tue, Jan 30, 2018 at 4:05 AM, Antoon Pardon <antoon.pardon at vub.be> wrote:
> > I am using python 2.6.7 to do a little network programming, but it seems I don't
> > get all the results.
> > When I call socket.gethostbyaddr(IP) entry  of the result is a list of 34 addresses.
gethostbyaddr just calls the underlying C library function. It is
possibly that this has a limit (either on the number of names or more
likely on the packet size).
_ | Peter J. Holzer | we build much bigger, better disasters now
|_|_) | | because we have much more sophisticated
| | | hjp at hjp.at | management tools.
__/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: not available