File net-tools-1.60-netstat_retval.diff of Package net-tools

--- netstat.c	2009-12-21 15:28:40.000000000 +0530
+++ netstat.c	2009-12-21 15:59:54.000000000 +0530
@@ -2190,6 +2190,7 @@ int main
 		if (!afname[0]) {
 			inittab();
 			parsesnmp(flag_raw, flag_tcp, flag_udp, flag_sctp);
+			return 0;
 		} else {
 			safe_strncpy(buf, afname, sizeof(buf));
 			tmp1 = buf;
@@ -2199,9 +2200,14 @@ int main
 #if HAVE_AFINET6
 				inittab6();
 				parsesnmp6(flag_raw, flag_tcp, flag_udp, flag_sctp);
+				return 0;
 #else
 				printf("Address type not supported for stats\n");
 #endif
+			} else if(!strncmp(buf,"inet",4)) {
+				inittab();
+				parsesnmp(flag_raw, flag_tcp, flag_udp, flag_sctp);
+				return 0;
 			} else {
 				printf("Address type not supported for stats\n");
 			}
openSUSE Build Service is sponsored by