aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/ping.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/ping.c b/networking/ping.c
index 8571d179b..7f74c26fa 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -675,9 +675,11 @@ static void ping4(len_and_sockaddr *lsa)
675 sockopt = (datalen * 2) + 7 * 1024; /* giving it a bit of extra room */ 675 sockopt = (datalen * 2) + 7 * 1024; /* giving it a bit of extra room */
676 setsockopt(pingsock, SOL_SOCKET, SO_RCVBUF, &sockopt, sizeof(sockopt)); 676 setsockopt(pingsock, SOL_SOCKET, SO_RCVBUF, &sockopt, sizeof(sockopt));
677 677
678 if (opt_ttl != 0) 678 if (opt_ttl != 0) {
679 //setsockopt(pingsock, IPPROTO_IP, IP_MULTICAST_TTL, &opt_ttl, sizeof(opt_ttl));
680 setsockopt(pingsock, IPPROTO_IP, IP_TTL, &opt_ttl, sizeof(opt_ttl)); 679 setsockopt(pingsock, IPPROTO_IP, IP_TTL, &opt_ttl, sizeof(opt_ttl));
680 /* above doesnt affect packets sent to bcast IP, so... */
681 setsockopt(pingsock, IPPROTO_IP, IP_MULTICAST_TTL, &opt_ttl, sizeof(opt_ttl));
682 }
681 683
682 signal(SIGINT, print_stats_and_exit); 684 signal(SIGINT, print_stats_and_exit);
683 685