Accepting request 22166 from network:utilities

Copy from network:utilities/iproute2 based on submit request 22166 from user sax2

OBS-URL: https://build.opensuse.org/request/show/22166
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iproute2?expand=0&rev=24
This commit is contained in:
OBS User autobuild 2009-10-12 12:23:19 +00:00 committed by Git OBS Bridge
parent 298fb7c2f4
commit 881b4f3214
3 changed files with 64 additions and 3 deletions

View File

@ -1,5 +1,5 @@
--- misc/ss.c 2009-08-28 16:14:59.000000000 +0200
+++ misc/ss.c 2009-08-28 16:16:00.000000000 +0200
--- misc/ss.c 2009-10-09 14:26:41.000000000 +0200
+++ misc/ss.c 2009-10-09 14:30:00.000000000 +0200
@@ -464,6 +464,7 @@
}
}
@ -8,3 +8,59 @@
}
}
--- misc/ss.c 2009-10-09 14:39:14.000000000 +0200
+++ misc/ss.c 2009-10-09 14:40:25.000000000 +0200
@@ -1571,10 +1571,12 @@
status = fread(buf, 1, sizeof(*h), fp);
if (status < 0) {
perror("Reading header from $TCPDIAG_FILE");
+ fclose (fp);
return -1;
}
if (status != sizeof(*h)) {
perror("Unexpected EOF reading $TCPDIAG_FILE");
+ fclose (fp);
return -1;
}
@@ -1582,16 +1584,20 @@
if (status < 0) {
perror("Reading $TCPDIAG_FILE");
+ fclose (fp);
return -1;
}
if (status + sizeof(*h) < h->nlmsg_len) {
perror("Unexpected EOF reading $TCPDIAG_FILE");
+ fclose (fp);
return -1;
}
/* The only legal exit point */
- if (h->nlmsg_type == NLMSG_DONE)
+ if (h->nlmsg_type == NLMSG_DONE) {
+ fclose (fp);
return 0;
+ }
if (h->nlmsg_type == NLMSG_ERROR) {
struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h);
@@ -1601,13 +1607,17 @@
errno = -err->error;
perror("TCPDIAG answered");
}
+ fclose (fp);
return -1;
}
err = tcp_show_sock(h, f);
- if (err < 0)
+ if (err < 0) {
+ fclose (fp);
return err;
+ }
}
+ fclose (fp);
}
static int tcp_show(struct filter *f, int socktype)

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Oct 9 14:17:41 CEST 2009 - ms@suse.de
- added missing fclose to ss utility (bnc #543986)
-------------------------------------------------------------------
Wed Sep 16 11:36:06 CEST 2009 - ms@suse.de

View File

@ -25,7 +25,7 @@ Group: Productivity/Networking/Routing
Provides: iproute
AutoReqProv: on
Version: 2.6.29.1
Release: 4
Release: 5
%define rversion 2.6.29-1
Summary: Advanced Routing
Url: http://developer.osdl.org/dev/iproute2/