⚡ Bolt: [performance improvement] Added -n flag to skip reverse DNS resolution#18
Conversation
…esolution The `-n` flag skips reverse DNS resolution. Without it, ping attempts to resolve the hostname for every IP, which can cause multi-second delays (even with a 1s timeout) if the IP lacks a PTR record or DNS is unresponsive. Co-authored-by: ManupaKDU <95234271+ManupaKDU@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What: Added the
-nflag to thepingcommand executed inis_reachable.🎯 Why: Without
-n, thepingcommand performs a reverse DNS lookup for every IP address. If the DNS server is unresponsive or the IP lacks a PTR record, this can cause the command to hang for several seconds, ignoring the explicit-W 1timeout flag.📊 Impact: Completely eliminates multi-second hangs per IP on unreachable networks, preventing thread pool starvation and drastically accelerating the overall scan.
🔬 Measurement: Run
time python3 testping1.pyon an unroutable subnet before and after the change; also observe thattime ping -c 1 -W 1 192.168.43.1vstime ping -n -c 1 -W 1 192.168.43.1shows the latter is consistently faster on unroutable IPs without PTR records.PR created automatically by Jules for task 9892437027182549562 started by @ManupaKDU