Skip to content

⚡ Bolt: [performance improvement] Added -n flag to skip reverse DNS resolution#18

Merged
manupawickramasinghe merged 1 commit intomainfrom
bolt/skip-reverse-dns-ping-9892437027182549562
Mar 22, 2026
Merged

⚡ Bolt: [performance improvement] Added -n flag to skip reverse DNS resolution#18
manupawickramasinghe merged 1 commit intomainfrom
bolt/skip-reverse-dns-ping-9892437027182549562

Conversation

@ManupaKDU
Copy link
Contributor

💡 What: Added the -n flag to the ping command executed in is_reachable.
🎯 Why: Without -n, the ping command 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 1 timeout 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.py on an unroutable subnet before and after the change; also observe that time ping -c 1 -W 1 192.168.43.1 vs time ping -n -c 1 -W 1 192.168.43.1 shows the latter is consistently faster on unroutable IPs without PTR records.


PR created automatically by Jules for task 9892437027182549562 started by @ManupaKDU

…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>
@google-labs-jules
Copy link
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@manupawickramasinghe manupawickramasinghe merged commit a571b51 into main Mar 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants