After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 634749 - no output detected with iputils-ping
no output detected with iputils-ping
Status: RESOLVED FIXED
Product: gnome-nettool
Classification: Applications
Component: Tools
git master
Other Linux
: Normal normal
: ---
Assigned To: Germán Poo-Caamaño
Rodrigo Moya
Depends on:
Blocks:
 
 
Reported: 2010-11-13 13:12 UTC by Josselin Mouette
Modified: 2011-07-13 07:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Handle icmp_req as well as icmp_seq in output (2.60 KB, patch)
2010-11-13 13:12 UTC, Josselin Mouette
committed Details | Review
Patch to ping.h to allow icmp_req or icmp_seq to parse (1.82 KB, patch)
2011-02-17 03:04 UTC, Ron Lusk
needs-work Details | Review

Description Josselin Mouette 2010-11-13 13:12:33 UTC
Created attachment 174387 [details] [review]
Handle icmp_req as well as icmp_seq in output

The output from iputils-ping looks like this:
  64 bytes from window.gnome.org (209.132.180.167): icmp_req=1 ttl=53 time=170 ms

Since gnome-nettool looks for icmp_seq, not icmp_seq, it discards all output and considers ping fails.
Comment 1 Ron Lusk 2011-02-17 03:04:40 UTC
Created attachment 181098 [details] [review]
Patch to ping.h to allow icmp_req or icmp_seq to parse

Requires no changes to code elsewhere in the program.
Comment 2 Germán Poo-Caamaño 2011-07-13 07:12:47 UTC
Review of attachment 174387 [details] [review]:

Thanks.
Comment 3 Germán Poo-Caamaño 2011-07-13 07:16:22 UTC
Review of attachment 181098 [details] [review]:

This patch needs work. BTW, the problem is fixed in Linux,
where the bug was found.  I assume other platforms are working
fine.

::: src/ping.h
@@ +29,3 @@
 #   define PING_PROGRAM_FORMAT "%s ping -b%s-n %s"
 #   define PING_PROGRAM_FORMAT_6 "%s ping6%s-n %s"
+#   define PING_FORMAT "%d bytes from %s icmp_%*1ceq=%d ttl=%d time=%s %s"

%*1c gives warnings.

@@ +35,3 @@
 #   define PING_PROGRAM_FORMAT "%s ping%s-n %s"
 #   define PING_PROGRAM_FORMAT_6 "%s ping6%s-n %s"
+#   define PING_FORMAT "%d bytes from %s icmp_%*1ceq=%d ttl=%d time=%s %s"

In this case, the number of arguments increase in 1.  So, it is necessary to fix PING_PARAMS and change the
source code.  Look at the patch from Josselin Mouette.
Comment 4 Germán Poo-Caamaño 2011-07-13 07:16:58 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.