Accepting request 52263 from security:netfilter

Accepted submit request 52263 from user jengelh

OBS-URL: https://build.opensuse.org/request/show/52263
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iproute2?expand=0&rev=32
This commit is contained in:
Ruediger Oertel 2010-11-08 13:46:05 +00:00 committed by Git OBS Bridge
parent 6c43347258
commit 7d07855d24
12 changed files with 284 additions and 461 deletions

View File

@ -1,22 +0,0 @@
Give ARPHRD_NONE a name so that "tun"-style tunnels don't appear
as link/65534.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
lib/ll_types.c | 3 +++
1 file changed, 3 insertions(+)
Index: iproute2-2.6.23/lib/ll_types.c
===================================================================
--- iproute2-2.6.23.orig/lib/ll_types.c
+++ iproute2-2.6.23/lib/ll_types.c
@@ -124,6 +124,9 @@ __PF(IEEE80211_PRISM,ieee802.11/prism)
#ifdef ARPHRD_IEEE80211_RADIOTAP
__PF(IEEE80211_RADIOTAP,ieee802.11/radiotap)
#endif
+#ifdef ARPHRD_NONE
+__PF(NONE,none)
+#endif
#ifdef ARPHRD_VOID
__PF(VOID,void)
#endif

View File

@ -1,14 +0,0 @@
Index: iproute2-2.6.25/ip/xfrm.h
===================================================================
--- ip/xfrm.h
+++ ip/xfrm.h
@@ -32,9 +32,6 @@
#ifndef IPPROTO_SCTP
# define IPPROTO_SCTP 132
#endif
-#ifndef IPPPROTO_DCCP
-# define IPPROTO_DCCP 33
-#endif
#ifndef IPPROTO_MH
# define IPPROTO_MH 135
#endif

View File

@ -1,6 +1,40 @@
diff -ur iproute2-2.6.29-1.orig/include/iptables.h iproute2-2.6.29-1/include/iptables.h
--- include/iptables.h 2009-03-24 23:40:54.000000000 +0100
+++ include/iptables.h 2009-08-12 14:07:27.568892610 +0200
---
Makefile | 8 ++++----
include/iptables.h | 2 +-
netem/Makefile | 6 ++++--
3 files changed, 9 insertions(+), 7 deletions(-)
Index: Makefile
===================================================================
--- Makefile.orig
+++ Makefile
@@ -1,10 +1,10 @@
DESTDIR=/usr/
ROOTDIR=$(DESTDIR)
LIBDIR=/usr/lib/
-SBINDIR=/sbin
+SBINDIR=/usr/sbin
CONFDIR=/etc/iproute2
-DOCDIR=/share/doc/iproute2
-MANDIR=/share/man
+DOCDIR=/usr/share/doc/packages/iproute2
+MANDIR=/usr/share/man
ARPDDIR=/var/lib/arpd
# Path to db_185.h include
@@ -30,7 +30,7 @@ ADDLIB+=ipx_ntop.o ipx_pton.o
CC = gcc
HOSTCC = gcc
CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
-CFLAGS = $(CCOPTS) -I../include $(DEFINES)
+CFLAGS = -DLIBDIR=\"$(LIBDIR)\" $(CCOPTS) -I../include $(DEFINES)
YACCFLAGS = -d -t -v
LDLIBS += -L../lib -lnetlink -lutil
Index: include/iptables.h
===================================================================
--- include/iptables.h.orig
+++ include/iptables.h
@@ -5,7 +5,7 @@
#include "libiptc/libiptc.h"
@ -10,22 +44,11 @@ diff -ur iproute2-2.6.29-1.orig/include/iptables.h iproute2-2.6.29-1/include/ipt
#endif
#ifndef IPPROTO_SCTP
diff -ur iproute2-2.6.29-1.orig/Makefile iproute2-2.6.29-1/Makefile
--- Makefile 2009-03-24 23:40:54.000000000 +0100
+++ Makefile 2009-08-12 14:07:27.568892610 +0200
@@ -23,7 +23,7 @@
CC = gcc
HOSTCC = gcc
CCOPTS = -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall
-CFLAGS = $(CCOPTS) -I../include $(DEFINES)
+CFLAGS = -DLIBDIR=\"$(LIBDIR)\" $(CCOPTS) -I../include $(DEFINES)
YACCFLAGS = -d -t -v
LDLIBS += -L../lib -lnetlink -lutil
diff -ur iproute2-2.6.29-1.orig/netem/Makefile iproute2-2.6.29-1/netem/Makefile
--- netem/Makefile 2009-03-24 23:40:54.000000000 +0100
+++ netem/Makefile 2009-08-12 14:07:27.570892934 +0200
@@ -5,6 +5,8 @@
Index: netem/Makefile
===================================================================
--- netem/Makefile.orig
+++ netem/Makefile
@@ -5,6 +5,8 @@ HOSTCC ?= $(CC)
CCOPTS = $(CBUILD_CFLAGS)
LDLIBS += -lm
@ -34,38 +57,15 @@ diff -ur iproute2-2.6.29-1.orig/netem/Makefile iproute2-2.6.29-1/netem/Makefile
all: $(DISTGEN) $(DISTDATA)
$(DISTGEN):
Nur in iproute2-2.6.29-1/netem: Makefile.orig.
Nur in iproute2-2.6.29-1/netem: Makefile.rej.
Nur in iproute2-2.6.29-1/tc: Makefile.orig.
Nur in iproute2-2.6.29-1/tc: Makefile.rej.
Nur in iproute2-2.6.29-1/tc: tc_util.c.orig.
Nur in iproute2-2.6.29-1/tc: tc_util.c.rej.
--- Makefile 2009-03-24 23:40:54.000000000 +0100
+++ Makefile 2009-08-12 14:22:45.785935139 +0200
@@ -1,9 +1,9 @@
DESTDIR=/usr/
LIBDIR=/usr/lib/
-SBINDIR=/sbin
+SBINDIR=/usr/sbin
CONFDIR=/etc/iproute2
-DOCDIR=/share/doc/iproute2
-MANDIR=/share/man
+DOCDIR=/usr/share/doc/packages/iproute2
+MANDIR=/usr/share/man
# Path to db_185.h include
DBM_INCLUDE:=/usr/include
--- netem/Makefile 2009-03-24 23:40:54.000000000 +0100
+++ netem/Makefile 2009-08-12 14:24:57.748903617 +0200
@@ -20,9 +20,9 @@
@@ -20,9 +22,9 @@ stats: stats.c
$(HOSTCC) $(CCOPTS) -I../include -o $@ $@.c -lm
install: all
- mkdir -p $(DESTDIR)/lib/tc
- mkdir -p $(DESTDIR)$(LIBDIR)/tc
+ mkdir -p $(DESTDIR)/usr/share/tc
for i in $(DISTDATA); \
- do install -m 755 $$i $(DESTDIR)/lib/tc; \
+ do install -m 755 $$i $(DESTDIR)/usr/share/tc; \
- do install -m 644 $$i $(DESTDIR)$(LIBDIR)/tc; \
+ do install -m 644 $$i $(DESTDIR)/usr/share/tc; \
done
clean:

View File

@ -1,31 +0,0 @@
--- ip/ipmonitor.c
+++ ip/ipmonitor.c
@@ -102,6 +102,7 @@ int do_ipmonitor(int argc, char **argv)
int laddr=0;
int lroute=0;
int lprefix=0;
+ int lneigh=0;
rtnl_close(&rth);
ipaddr_reset_filter(1);
@@ -124,6 +125,9 @@ int do_ipmonitor(int argc, char **argv)
} else if (matches(*argv, "prefix") == 0) {
lprefix=1;
groups = 0;
+ } else if (matches(*argv, "neigh") == 0) {
+ lneigh=1;
+ groups = 0;
} else if (strcmp(*argv, "all") == 0) {
groups = ~RTMGRP_TC;
} else if (matches(*argv, "help") == 0) {
@@ -153,7 +157,9 @@ int do_ipmonitor(int argc, char **argv)
if (!preferred_family || preferred_family == AF_INET6)
groups |= nl_mgrp(RTNLGRP_IPV6_PREFIX);
}
-
+ if (lneigh) {
+ groups |= nl_mgrp(RTNLGRP_NEIGH);
+ }
if (file) {
FILE *fp;
fp = fopen(file, "r");

View File

@ -1,7 +1,13 @@
--- tc/m_skbedit.c 2009-03-24 22:40:54.000000000 +0000
+++ tc/m_skbedit.c 2009-11-11 09:42:09.000000000 +0000
@@ -57,6 +57,8 @@
__u32 flags = 0, priority;
---
tc/m_skbedit.c | 2 ++
1 file changed, 2 insertions(+)
Index: tc/m_skbedit.c
===================================================================
--- tc/m_skbedit.c.orig
+++ tc/m_skbedit.c
@@ -60,6 +60,8 @@ parse_skbedit(struct action_util *a, int
__u32 flags = 0, priority, mark;
struct tc_skbedit sel = { 0 };
+ memset(&sel, 0, sizeof(struct tc_skbedit));

View File

@ -1,73 +0,0 @@
--- tc/emp_ematch.l
+++ tc/emp_ematch.l 2007/07/12 09:53:11
@@ -63,7 +63,7 @@
%}
-%x str
+%x STR
%option 8bit stack warn noyywrap prefix="ematch_"
%%
@@ -78,17 +78,17 @@
}
strbuf_index = 0;
- BEGIN(str);
+ BEGIN(STR);
}
-<str>\" {
+<STR>\" {
BEGIN(INITIAL);
yylval.b = bstr_new(strbuf, strbuf_index);
yylval.b->quoted = 1;
return ATTRIBUTE;
}
-<str>\\[0-7]{1,3} { /* octal escape sequence */
+<STR>\\[0-7]{1,3} { /* octal escape sequence */
int res;
sscanf(yytext + 1, "%o", &res);
@@ -100,12 +100,12 @@
strbuf_append_char((unsigned char) res);
}
-<str>\\[0-9]+ { /* catch wrong octal escape seq. */
+<STR>\\[0-9]+ { /* catch wrong octal escape seq. */
fprintf(stderr, "error: invalid octale escape sequence\n");
return ERROR;
}
-<str>\\x[0-9a-fA-F]{1,2} {
+<STR>\\x[0-9a-fA-F]{1,2} {
int res;
sscanf(yytext + 2, "%x", &res);
@@ -118,16 +118,16 @@
strbuf_append_char((unsigned char) res);
}
-<str>\\n strbuf_append_char('\n');
-<str>\\r strbuf_append_char('\r');
-<str>\\t strbuf_append_char('\t');
-<str>\\v strbuf_append_char('\v');
-<str>\\b strbuf_append_char('\b');
-<str>\\f strbuf_append_char('\f');
-<str>\\a strbuf_append_char('\a');
+<STR>\\n strbuf_append_char('\n');
+<STR>\\r strbuf_append_char('\r');
+<STR>\\t strbuf_append_char('\t');
+<STR>\\v strbuf_append_char('\v');
+<STR>\\b strbuf_append_char('\b');
+<STR>\\f strbuf_append_char('\f');
+<STR>\\a strbuf_append_char('\a');
-<str>\\(.|\n) strbuf_append_char(yytext[1]);
-<str>[^\\\n\"]+ strbuf_append_charp(yytext);
+<STR>\\(.|\n) strbuf_append_char(yytext[1]);
+<STR>[^\\\n\"]+ strbuf_append_charp(yytext);
[aA][nN][dD] return AND;
[oO][rR] return OR;

View File

@ -1,64 +0,0 @@
--- ip/ipmonitor.c
+++ ip/ipmonitor.c
@@ -25,6 +25,7 @@
#include "ip_common.h"
static void usage(void) __attribute__((noreturn));
+int prefix_banner;
static void usage(void)
{
@@ -42,31 +43,45 @@ int accept_msg(const struct sockaddr_nl *who,
print_timestamp(fp);
if (n->nlmsg_type == RTM_NEWROUTE || n->nlmsg_type == RTM_DELROUTE) {
+ if (prefix_banner)
+ fprintf(fp, "[ROUTE]");
print_route(who, n, arg);
return 0;
}
if (n->nlmsg_type == RTM_NEWLINK || n->nlmsg_type == RTM_DELLINK) {
ll_remember_index(who, n, NULL);
+ if (prefix_banner)
+ fprintf(fp, "[LINK]");
print_linkinfo(who, n, arg);
return 0;
}
if (n->nlmsg_type == RTM_NEWADDR || n->nlmsg_type == RTM_DELADDR) {
+ if (prefix_banner)
+ fprintf(fp, "[ADDR]");
print_addrinfo(who, n, arg);
return 0;
}
if (n->nlmsg_type == RTM_NEWADDRLABEL || n->nlmsg_type == RTM_DELADDRLABEL) {
+ if (prefix_banner)
+ fprintf(fp, "[ADDRLABEL]");
print_addrlabel(who, n, arg);
return 0;
}
if (n->nlmsg_type == RTM_NEWNEIGH || n->nlmsg_type == RTM_DELNEIGH) {
+ if (prefix_banner)
+ fprintf(fp, "[NEIGH]");
print_neigh(who, n, arg);
return 0;
}
if (n->nlmsg_type == RTM_NEWPREFIX) {
+ if (prefix_banner)
+ fprintf(fp, "[PREFIX]");
print_prefix(who, n, arg);
return 0;
}
if (n->nlmsg_type == RTM_NEWRULE || n->nlmsg_type == RTM_DELRULE) {
+ if (prefix_banner)
+ fprintf(fp, "[RULE]");
print_rule(who, n, arg);
return 0;
}
@@ -130,6 +145,7 @@ int do_ipmonitor(int argc, char **argv)
groups = 0;
} else if (strcmp(*argv, "all") == 0) {
groups = ~RTMGRP_TC;
+ prefix_banner=1;
} else if (matches(*argv, "help") == 0) {
usage();
} else {

View File

@ -1,30 +1,22 @@
--- ./tc/q_netem.c.orig 2008-10-13 13:17:03.000000000 +0000
+++ ./tc/q_netem.c 2008-10-13 13:19:54.000000000 +0000
@@ -100,7 +100,8 @@
static int isnumber(const char *arg)
{
char *p;
- (void) strtod(arg, &p);
+ double res = 0;
+ res = strtod(arg, &p);
return (p != arg);
}
--- ./netem/maketable.c.orig 2008-10-13 13:32:22.000000000 +0000
+++ ./netem/maketable.c 2008-10-13 13:32:47.000000000 +0000
@@ -38,7 +38,8 @@
}
for (i=0; i<limit; ++i){
- fscanf(fp, "%lf", &x[i]);
+ int res = 0;
+ res = fscanf(fp, "%lf", &x[i]);
if (feof(fp))
break;
++n;
--- ./ip/ip6tunnel.c.orig 2008-10-13 13:09:19.000000000 +0000
+++ ./ip/ip6tunnel.c 2008-10-13 13:09:46.000000000 +0000
@@ -266,8 +266,9 @@
---
ip/ip6tunnel.c | 5 +++--
ip/ipmaddr.c | 3 ++-
ip/ipmroute.c | 6 ++++--
ip/iptunnel.c | 5 +++--
ip/rtmon.c | 6 ++++--
misc/ifstat.c | 6 ++++--
misc/lnstat_util.c | 11 +++++++----
misc/nstat.c | 6 ++++--
misc/rtacct.c | 6 ++++--
misc/ss.c | 39 ++++++++++++++++++++++++++-------------
netem/maketable.c | 3 ++-
11 files changed, 63 insertions(+), 33 deletions(-)
Index: ip/ip6tunnel.c
===================================================================
--- ip/ip6tunnel.c.orig
+++ ip/ip6tunnel.c
@@ -261,8 +261,9 @@ static int do_tunnels_list(struct ip6_tn
}
/* skip two lines at the begenning of the file */
@ -36,31 +28,11 @@
while (fgets(buf, sizeof(buf), fp) != NULL) {
char name[IFNAMSIZ];
--- ./ip/ipmroute.c.orig 2008-10-13 13:11:09.000000000 +0000
+++ ./ip/ipmroute.c 2008-10-13 13:11:54.000000000 +0000
@@ -58,7 +58,8 @@
if (!fp)
return;
- fgets(buf, sizeof(buf), fp);
+ char* res = 0;
+ res = fgets(buf, sizeof(buf), fp);
while (fgets(buf, sizeof(buf), fp)) {
int vifi;
@@ -83,7 +84,8 @@
if (!fp)
return;
- fgets(buf, sizeof(buf), fp);
+ char* res = 0;
+ res = fgets(buf, sizeof(buf), fp);
while (fgets(buf, sizeof(buf), fp)) {
inet_prefix maddr, msrc;
--- ./ip/ipmaddr.c.orig 2008-10-13 13:10:16.000000000 +0000
+++ ./ip/ipmaddr.c 2008-10-13 13:10:43.000000000 +0000
@@ -128,7 +128,8 @@
Index: ip/ipmaddr.c
===================================================================
--- ip/ipmaddr.c.orig
+++ ip/ipmaddr.c
@@ -128,7 +128,8 @@ void read_igmp(struct ma_info **result_p
if (!fp)
return;
memset(&m, 0, sizeof(m));
@ -70,9 +42,35 @@
m.addr.family = AF_INET;
m.addr.bitlen = 32;
--- ./ip/iptunnel.c.orig 2008-10-13 13:03:20.000000000 +0000
+++ ./ip/iptunnel.c 2008-10-13 13:08:52.000000000 +0000
@@ -390,8 +390,9 @@
Index: ip/ipmroute.c
===================================================================
--- ip/ipmroute.c.orig
+++ ip/ipmroute.c
@@ -58,7 +58,8 @@ static void read_viftable(void)
if (!fp)
return;
- fgets(buf, sizeof(buf), fp);
+ char* res = 0;
+ res = fgets(buf, sizeof(buf), fp);
while (fgets(buf, sizeof(buf), fp)) {
int vifi;
@@ -83,7 +84,8 @@ static void read_mroute_list(FILE *ofp)
if (!fp)
return;
- fgets(buf, sizeof(buf), fp);
+ char* res = 0;
+ res = fgets(buf, sizeof(buf), fp);
while (fgets(buf, sizeof(buf), fp)) {
inet_prefix maddr, msrc;
Index: ip/iptunnel.c
===================================================================
--- ip/iptunnel.c.orig
+++ ip/iptunnel.c
@@ -412,8 +412,9 @@ static int do_tunnels_list(struct ip_tun
return -1;
}
@ -84,9 +82,11 @@
while (fgets(buf, sizeof(buf), fp) != NULL) {
char *ptr;
--- ./ip/rtmon.c.orig 2008-10-13 13:12:15.000000000 +0000
+++ ./ip/rtmon.c 2008-10-13 13:13:20.000000000 +0000
@@ -33,6 +33,7 @@
Index: ip/rtmon.c
===================================================================
--- ip/rtmon.c.orig
+++ ip/rtmon.c
@@ -33,6 +33,7 @@ static void write_stamp(FILE *fp)
char buf[128];
struct nlmsghdr *n1 = (void*)buf;
struct timeval tv;
@ -94,7 +94,7 @@
n1->nlmsg_type = 15;
n1->nlmsg_flags = 0;
@@ -42,7 +43,7 @@
@@ -42,7 +43,7 @@ static void write_stamp(FILE *fp)
gettimeofday(&tv, NULL);
((__u32*)NLMSG_DATA(n1))[0] = tv.tv_sec;
((__u32*)NLMSG_DATA(n1))[1] = tv.tv_usec;
@ -103,9 +103,46 @@
}
static int dump_msg(const struct sockaddr_nl *who, struct nlmsghdr *n,
--- ./misc/lnstat_util.c.orig 2008-10-13 13:30:32.000000000 +0000
+++ ./misc/lnstat_util.c 2008-10-13 13:32:00.000000000 +0000
@@ -49,7 +49,8 @@
@@ -51,7 +52,8 @@ static int dump_msg(const struct sockadd
FILE *fp = (FILE*)arg;
if (!init_phase)
write_stamp(fp);
- fwrite((void*)n, 1, NLMSG_ALIGN(n->nlmsg_len), fp);
+ int res = 0;
+ res = fwrite((void*)n, 1, NLMSG_ALIGN(n->nlmsg_len), fp);
fflush(fp);
return 0;
}
Index: misc/ifstat.c
===================================================================
--- misc/ifstat.c.orig
+++ misc/ifstat.c
@@ -717,8 +717,9 @@ int main(int argc, char *argv[])
fclose(tfp);
}
if (uptime >= 0 && time(NULL) >= stb.st_mtime+uptime) {
+ int res = 0;
fprintf(stderr, "ifstat: history is aged out, resetting\n");
- ftruncate(fileno(hist_fp), 0);
+ res = ftruncate(fileno(hist_fp), 0);
}
}
@@ -760,7 +761,8 @@ int main(int argc, char *argv[])
dump_incr_db(stdout);
}
if (!no_update) {
- ftruncate(fileno(hist_fp), 0);
+ int res = 0;
+ res = ftruncate(fileno(hist_fp), 0);
rewind(hist_fp);
dump_raw_db(hist_fp, 1);
fflush(hist_fp);
Index: misc/lnstat_util.c
===================================================================
--- misc/lnstat_util.c.orig
+++ misc/lnstat_util.c
@@ -49,7 +49,8 @@ static int scan_lines(struct lnstat_file
num_lines++;
@ -115,7 +152,7 @@
gettimeofday(&lf->last_read, NULL);
for (j = 0; j < lf->num_fields; j++) {
@@ -89,12 +90,13 @@
@@ -89,12 +90,13 @@ int lnstat_update(struct lnstat_file *ln
for (lf = lnstat_files; lf; lf = lf->next) {
if (time_after(&lf->last_read, &lf->interval, &tv)) {
int i;
@ -130,7 +167,7 @@
}
scan_lines(lf, 1);
@@ -108,7 +110,7 @@
@@ -108,7 +110,7 @@ int lnstat_update(struct lnstat_file *ln
}
rewind(lf->fp);
@ -139,7 +176,7 @@
scan_lines(lf, 0);
}
}
@@ -140,9 +142,10 @@
@@ -140,9 +142,10 @@ static int __lnstat_scan_fields(struct l
static int lnstat_scan_fields(struct lnstat_file *lf)
{
char buf[FGETS_BUF_SIZE];
@ -151,11 +188,55 @@
return __lnstat_scan_fields(lf, buf);
}
--- ./misc/ss.c.orig 2008-10-13 13:18:25.000000000 +0000
+++ ./misc/ss.c 2008-10-13 13:25:22.000000000 +0000
@@ -261,7 +261,8 @@
snprintf(tmp, sizeof(tmp), "%s/%d/stat",
getenv("PROC_ROOT") ? : "/proc", pid);
Index: misc/nstat.c
===================================================================
--- misc/nstat.c.orig
+++ misc/nstat.c
@@ -567,8 +567,9 @@ int main(int argc, char *argv[])
fclose(tfp);
}
if (uptime >= 0 && time(NULL) >= stb.st_mtime+uptime) {
+ int res = 0;
fprintf(stderr, "nstat: history is aged out, resetting\n");
- ftruncate(fileno(hist_fp), 0);
+ res = ftruncate(fileno(hist_fp), 0);
}
}
@@ -612,7 +613,8 @@ int main(int argc, char *argv[])
dump_incr_db(stdout);
}
if (!no_update) {
- ftruncate(fileno(hist_fp), 0);
+ int res = 0;
+ res = ftruncate(fileno(hist_fp), 0);
rewind(hist_fp);
dump_kern_db(hist_fp, 1);
fflush(hist_fp);
Index: misc/rtacct.c
===================================================================
--- misc/rtacct.c.orig
+++ misc/rtacct.c
@@ -562,8 +562,10 @@ int main(int argc, char *argv[])
fprintf(stderr, "rtacct: something is so wrong with history file, that I prefer not to proceed.\n");
exit(-1);
}
- if (stb.st_size != sizeof(*hist_db))
- write(fd, kern_db, sizeof(*hist_db));
+ if (stb.st_size != sizeof(*hist_db)) {
+ ssize_t res = 0;
+ res = write(fd, kern_db, sizeof(*hist_db));
+ }
hist_db = mmap(NULL, sizeof(*hist_db),
PROT_READ|PROT_WRITE,
Index: misc/ss.c
===================================================================
--- misc/ss.c.orig
+++ misc/ss.c
@@ -290,7 +290,8 @@ static void user_ent_hash_build(void)
snprintf(tmp, sizeof(tmp), "%s/%d/stat", root, pid);
if ((fp = fopen(tmp, "r")) != NULL) {
- fscanf(fp, "%*d (%[^)])", process);
+ int res = 0;
@ -163,7 +244,7 @@
fclose(fp);
}
}
@@ -315,7 +316,8 @@
@@ -372,7 +373,8 @@ int get_slabstat(struct slabstat *s)
cnt = sizeof(*s)/sizeof(int);
@ -173,7 +254,7 @@
while(fgets(buf, sizeof(buf), fp) != NULL) {
int i;
for (i=0; i<sizeof(slabstat_ids)/sizeof(slabstat_ids[0]); i++) {
@@ -439,7 +441,8 @@
@@ -496,7 +498,8 @@ void init_service_resolver(void)
char buf[128];
FILE *fp = popen("/usr/sbin/rpcinfo -p 2>/dev/null", "r");
if (fp) {
@ -183,7 +264,7 @@
while (fgets(buf, sizeof(buf), fp) != NULL) {
unsigned int progn, port;
char proto[128], prog[128];
@@ -477,7 +480,8 @@
@@ -534,7 +537,8 @@ static int is_ephemeral(int port)
if (!ip_local_port_min) {
FILE *f = ephemeral_ports_open();
if (f) {
@ -193,7 +274,7 @@
&ip_local_port_min, &ip_local_port_max);
fclose(f);
} else {
@@ -654,7 +658,8 @@
@@ -711,7 +715,8 @@ int run_ssfilter(struct ssfilter *f, str
if (!low) {
FILE *fp = ephemeral_ports_open();
if (fp) {
@ -203,7 +284,7 @@
fclose(fp);
}
}
@@ -1496,8 +1501,10 @@
@@ -1555,8 +1560,10 @@ static int tcp_show_netlink(struct filte
return 0;
}
@ -216,7 +297,7 @@
h = (struct nlmsghdr*)buf;
while (NLMSG_OK(h, status)) {
@@ -1929,9 +1936,11 @@
@@ -1993,9 +2000,11 @@ int unix_show(struct filter *f)
int cnt;
struct unixstat *list = NULL;
@ -230,7 +311,7 @@
if (memcmp(buf, "Peer", 4) == 0)
newformat = 1;
@@ -2017,9 +2026,11 @@
@@ -2081,9 +2090,11 @@ int packet_show(struct filter *f)
if (!(f->states & (1<<SS_CLOSE)))
return 0;
@ -244,7 +325,7 @@
while (fgets(buf, sizeof(buf)-1, fp)) {
sscanf(buf, "%llx %*d %d %x %d %d %u %u %u",
@@ -2090,9 +2101,11 @@
@@ -2154,9 +2165,11 @@ int netlink_show(struct filter *f)
if (!(f->states & (1<<SS_CLOSE)))
return 0;
@ -258,118 +339,17 @@
while (fgets(buf, sizeof(buf)-1, fp)) {
sscanf(buf, "%llx %d %d %x %d %d %llx %d",
--- ./misc/rtacct.c.orig 2008-10-13 13:28:39.000000000 +0000
+++ ./misc/rtacct.c 2008-10-13 13:29:37.000000000 +0000
@@ -526,7 +526,8 @@
}
if (fork())
exit(0);
- chdir("/");
+ int res = 0;
+ res = chdir("/");
close(0); close(1); close(2); setsid();
signal(SIGPIPE, SIG_IGN);
signal(SIGCHLD, sigchild);
@@ -562,8 +563,10 @@
fprintf(stderr, "rtacct: something is so wrong with history file, that I prefer not to proceed.\n");
exit(-1);
}
- if (stb.st_size != sizeof(*hist_db))
- write(fd, kern_db, sizeof(*hist_db));
+ if (stb.st_size != sizeof(*hist_db)) {
+ ssize_t res = 0;
+ res = write(fd, kern_db, sizeof(*hist_db));
+ }
hist_db = mmap(NULL, sizeof(*hist_db),
PROT_READ|PROT_WRITE,
--- ./misc/ifstat.c.orig 2008-10-13 13:27:38.000000000 +0000
+++ ./misc/ifstat.c 2008-10-13 13:28:22.000000000 +0000
@@ -665,7 +665,8 @@
}
if (fork())
exit(0);
- chdir("/");
+ int res = 0;
+ res = chdir("/");
close(0); close(1); close(2); setsid();
signal(SIGPIPE, SIG_IGN);
signal(SIGCHLD, sigchild);
@@ -717,8 +718,9 @@
fclose(tfp);
}
if (uptime >= 0 && time(NULL) >= stb.st_mtime+uptime) {
+ int res = 0;
fprintf(stderr, "ifstat: history is aged out, resetting\n");
- ftruncate(fileno(hist_fp), 0);
+ res = ftruncate(fileno(hist_fp), 0);
}
}
@@ -760,7 +762,8 @@
dump_incr_db(stdout);
Index: netem/maketable.c
===================================================================
--- netem/maketable.c.orig
+++ netem/maketable.c
@@ -38,7 +38,8 @@ readdoubles(FILE *fp, int *number)
}
if (!no_update) {
- ftruncate(fileno(hist_fp), 0);
+ int res = 0;
+ res = ftruncate(fileno(hist_fp), 0);
rewind(hist_fp);
dump_raw_db(hist_fp, 1);
fflush(hist_fp);
--- ./misc/nstat.c.orig 2008-10-13 13:25:58.000000000 +0000
+++ ./misc/nstat.c 2008-10-13 13:27:16.000000000 +0000
@@ -515,7 +515,8 @@
}
if (fork())
exit(0);
- chdir("/");
+ int res = 0;
+ res = chdir("/");
close(0); close(1); close(2); setsid();
signal(SIGPIPE, SIG_IGN);
signal(SIGCHLD, sigchild);
@@ -567,8 +568,9 @@
fclose(tfp);
}
if (uptime >= 0 && time(NULL) >= stb.st_mtime+uptime) {
+ int res = 0;
fprintf(stderr, "nstat: history is aged out, resetting\n");
- ftruncate(fileno(hist_fp), 0);
+ res = ftruncate(fileno(hist_fp), 0);
}
}
@@ -612,7 +614,8 @@
dump_incr_db(stdout);
}
if (!no_update) {
- ftruncate(fileno(hist_fp), 0);
for (i=0; i<limit; ++i){
- fscanf(fp, "%lf", &x[i]);
+ int res = 0;
+ res = ftruncate(fileno(hist_fp), 0);
rewind(hist_fp);
dump_kern_db(hist_fp, 1);
fflush(hist_fp);
--- ./misc/arpd.c.orig 2008-10-13 13:29:59.000000000 +0000
+++ ./misc/arpd.c 2008-10-13 13:30:14.000000000 +0000
@@ -786,7 +786,8 @@
goto do_abort;
}
- chdir("/");
+ int res = 0;
+ res = chdir("/");
fd = open("/dev/null", O_RDWR);
if (fd >= 0) {
dup2(fd, 0);
--- ./ip/rtmon.c.orig 2008-10-13 15:41:51.000000000 +0200
+++ ./ip/rtmon.c 2008-10-13 15:42:19.000000000 +0200
@@ -52,7 +52,8 @@
FILE *fp = (FILE*)arg;
if (!init_phase)
write_stamp(fp);
- fwrite((void*)n, 1, NLMSG_ALIGN(n->nlmsg_len), fp);
+ int res = 0;
+ res = fwrite((void*)n, 1, NLMSG_ALIGN(n->nlmsg_len), fp);
fflush(fp);
return 0;
}
+ res = fscanf(fp, "%lf", &x[i]);
if (feof(fp))
break;
++n;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:13ffb0ffe5404c9dcc8bed8c692f07d934aa3fd44661df79dd1efbb37f83fb9b
size 367905

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:06d028c301203b39e82b7c1923fffc0169231951080238a91e13a0c2739512cf
size 387857

View File

@ -1,3 +1,53 @@
-------------------------------------------------------------------
Wed Nov 3 21:22:47 UTC 2010 - jengelh@medozas.de
- Update to iproute2-2.6.35+git9 for obtaining
Linux 2.6.36-introduced features (no iproute2-2.6.36 tag yet)
* Added RTA_MARK support (e.g. `ip route get ::1 mark 2`)
* 64-bit interface statistics
-------------------------------------------------------------------
Tue Nov 2 13:02:44 UTC 2010 - jengelh@medozas.de
- Update to iproute2-2.6.35
* Added support for multicast iprules
* Speed up `ss -p`
* Update ARP header type table
-------------------------------------------------------------------
Tue Nov 2 12:28:40 UTC 2010 - jengelh@medozas.de
- Update to iproute2-2.6.34
* Fix build issues with flex 2.5
* Detect 6rd tunnel scope
* Added `ip tuntap` support (this practically obsoletes the
"tunctl" package)
* Added support for XFRM/SA by fwmark
* Added initrwnd
- 2 patches integrated, thus dropped
-------------------------------------------------------------------
Tue Nov 2 12:02:02 UTC 2010 - jengelh@medozas.de
- Update to iproute2-2.6.33
* Added 6rd support
* Added macvlan options for bridge mode
* Added support to mark packets in skbedit
* Added oif classification support in iprule
-------------------------------------------------------------------
Tue Nov 2 11:43:33 UTC 2010 - jengelh@medozas.de
- Update to iproute2-2.6.31
* Dropped equalize support
* Fixed segfault when using garbage lladdr
* Added new m_xt module for iptables-1.4.5
* Added support for CAN
* Allow ISATAP with stateless autoconfiguration
* Added support for cgroup
* Added support for monitoring neigh table activities
- 3 patches integrated, thus dropped
-------------------------------------------------------------------
Tue Feb 23 22:45:41 UTC 2010 - jengelh@medozas.de

View File

@ -24,27 +24,22 @@ License: GPLv2+
Group: Productivity/Networking/Routing
Provides: iproute
AutoReqProv: on
Version: 2.6.29.1
Release: 8
%define rversion 2.6.29-1
Version: 2.6.35+9
Release: 0
%define rversion 2.6.35+9
Summary: Advanced Routing
Url: http://developer.osdl.org/dev/iproute2/
Source0: %name-%rversion.tar.bz2
Patch0: %name-2.6.29-1-libdir-1.diff
Patch1: %name-2.6.29-1-HZ.diff
Patch2: %name-2.6.29-1-pdfdoc.diff
Patch3: %name-2.6.29-1-tc-flex-fixes.diff
Patch4: %name-2.6.29-1-fragtimeout.diff
Patch5: %name-2.6.29-1-flushcheckuid.diff
Patch6: %name-2.6.29-1-DCCP-redefine
Patch7: %name-2.6.29-1-warnings.diff
Patch8: %name-2.6.29-1-skbedit-memset.diff
Patch9: %name-2.6.29-1-iptunnel-fclose.diff
Patch10: %name-2.6.29-1-ss-pclose.diff
Patch11: %name-2.6.29-1-neightable.diff
Patch12: %name-2.6.29-1-typelabels.diff
Patch13: %name-2.6.29-1-memleak.diff
Patch14: iproute-arphrd-none.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package -n libnetlink-devel
@ -76,18 +71,14 @@ Authors:
%patch0
%patch1
%patch2
%patch3
%patch4
# RTAX_FRAG_TIMEOUT not in kernel at all?
#%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
%patch13
%patch14 -p1
find . -name *.orig -print0 | xargs -r0 rm -v
%build