Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37561893
en ru br
ALT Linux repos
S:20221126-alt1
5.0: 20071127-alt4
4.1: 20071127-alt0.M41.1
4.0: 20020927-alt4.2
3.0: 20020927-alt2

Group :: Networking/Other
RPM: iputils

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: iputils-fc-ping_cleanup.patch
Download


--- iputils/ping.c.OLD	2006-02-06 10:34:35.000000000 +0100
+++ iputils/ping.c	2006-02-06 10:34:35.000000000 +0100
@@ -855,9 +855,36 @@
 		case ICMP_SR_FAILED:
 			printf("Source Route Failed\n");
 			break;
+		case ICMP_NET_UNKNOWN:
+			printf("Destination Net Unknown\n");
+			break;
+		case ICMP_HOST_UNKNOWN:
+			printf("Destination Host Unknown\n");
+			break;
+		case ICMP_HOST_ISOLATED:
+			printf("Source Host Isolated\n");
+			break;
+		case ICMP_NET_ANO:
+			printf("Destination Net Prohibited\n");
+			break;
+		case ICMP_HOST_ANO:
+			printf("Destination Host Prohibited\n");
+			break;
+		case ICMP_NET_UNR_TOS:
+			printf("Destination Net Unreachable for Type of Service\n");
+			break;
+		case ICMP_HOST_UNR_TOS:
+			printf("Destination Host Unreachable for Type of Service\n");
+			break;
 		case ICMP_PKT_FILTERED:
 			printf("Packet filtered\n");
 			break;
+		case ICMP_PREC_VIOLATION:
+			printf("Precedence Violation\n");
+			break;
+		case ICMP_PREC_CUTOFF:
+			printf("Precedence Cutoff\n");
+			break;
 		default:
 			printf("Dest Unreachable, Bad Code: %d\n", code);
 			break;
--- iputils/ping_common.c.OLD	2006-02-06 10:34:35.000000000 +0100
+++ iputils/ping_common.c	2006-02-06 10:34:35.000000000 +0100
@@ -819,7 +819,7 @@
 	}
 	if (pipesize > 1)
 		printf(", pipe %d", pipesize);
-	if (ntransmitted > 1 && (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
+	if (ntransmitted > 1 && nreceived && (!interval || (options&(F_FLOOD|F_ADAPTIVE)))) {
 		int ipg = (1000000*(long long)tv.tv_sec+tv.tv_usec)/(ntransmitted-1);
 		printf(", ipg/ewma %d.%03d/%d.%03d ms",
 		       ipg/1000, ipg%1000, rtt/8000, (rtt/8)%1000);
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin