- fixed return value of netstat -s call (bnc #566946)

OBS-URL: https://build.opensuse.org/package/show/network:utilities/net-tools?expand=0&rev=17
This commit is contained in:
Marcus Schaefer 2010-01-01 20:08:19 +00:00 committed by Git OBS Bridge
parent 40b5fa7118
commit b7ace726d5
3 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,25 @@
--- 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");
}

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jan 1 21:07:12 CET 2010 - ms@suse.de
- fixed return value of netstat -s call (bnc #566946)
-------------------------------------------------------------------
Wed Dec 16 11:49:33 CET 2009 - ms@suse.de

View File

@ -77,6 +77,7 @@ Patch42: net-tools-1.60-ifindex.diff
Patch43: net-tools-1.60-infiniband.diff
Patch44: net-tools-1.60-netrom-fopen.diff
Patch45: net-tools-1.60-doc.dif
Patch46: net-tools-1.60-netstat_retval.diff
%description
This package contains essential programs for network administration and
@ -140,6 +141,7 @@ cd ..
%patch43
%patch44
%patch45
%patch46
%build
make config