Nmap Development mailing list archives
Re: ncat should try connecting to all resolved addresses, not only the first one
From: Jacek Wielemborek <wielemborekj1 () gmail com>
Date: Mon, 2 Sep 2013 18:35:13 +0200
2013/9/2 Jaromir Koncicky <jkoncick () redhat com>:
I made a patch which adds this functionality: if one resolved address fails, next one is tried. You can find it there: https://bugzilla.redhat.com/show_bug.cgi?id=978964#c6 I am not very familiar with the code, so I'd like to consult how to do this better. I don't think the way I made it is ideal and would like to make it more acceptable. Thanks a lot for your feedback! ----- Original Message ----- From: "Jaromir Koncicky" <jkoncick () redhat com> To: dev () nmap org Sent: Thursday, August 29, 2013 10:18:58 AM Subject: ncat should try connecting to all resolved addresses, not only the first one This problem was already reported in Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=978964 As I described in my comment, ncat should try connecting to another address resolved by getaddrinfo(), if connecting to one fails. In current situation, I cannot connect to a host whose hostname is resolved to more addresses, the first one resolved address is IPv6 and I cannot connect through IPv6. I'm going to make a patch which would do this. If you have anything to tell me or suggest about this, tell me. I will start making a patch and if I succeed, I'll post it here. _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Hi, Once saw a similar script - for listen mode IIRC - that watched for the ncat_listen return value to re-try from ncat_main.c with different input if it failed. I can't find the patch (and who wrote that) and I'm not sure it was ncat_main.c or ncat_listen.c though.Perhaps it would be a bit better than gotos? Yours, Jacek Wielemborek _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- ncat should try connecting to all resolved addresses, not only the first one Jaromir Koncicky (Aug 29)
- Re: ncat should try connecting to all resolved addresses, not only the first one Jaromir Koncicky (Sep 02)
- Re: ncat should try connecting to all resolved addresses, not only the first one Jacek Wielemborek (Sep 02)
- Re: ncat should try connecting to all resolved addresses, not only the first one David Fifield (Sep 10)
- Re: ncat should try connecting to all resolved addresses, not only the first one Jaromir Koncicky (Sep 02)