Accepting request 20502 from network:utilities
Copy from network:utilities/iproute2 based on submit request 20502 from user sax2 OBS-URL: https://build.opensuse.org/request/show/20502 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iproute2?expand=0&rev=23
This commit is contained in:
parent
27b8b4bdb0
commit
298fb7c2f4
11
iproute2-2.6.29-1-memleak.diff
Normal file
11
iproute2-2.6.29-1-memleak.diff
Normal file
@ -0,0 +1,11 @@
|
||||
--- ip/ipmaddr.c 2009-09-16 11:21:21.000000000 +0200
|
||||
+++ ip/ipmaddr.c 2009-09-16 11:23:14.000000000 +0200
|
||||
@@ -136,7 +136,7 @@
|
||||
m.addr.bytelen = 4;
|
||||
|
||||
while (fgets(buf, sizeof(buf), fp)) {
|
||||
- struct ma_info *ma = malloc(sizeof(m));
|
||||
+ struct ma_info *ma;
|
||||
|
||||
if (buf[0] != '\t') {
|
||||
sscanf(buf, "%d%s", &m.index, m.name);
|
31
iproute2-2.6.29-1-neightable.diff
Normal file
31
iproute2-2.6.29-1-neightable.diff
Normal file
@ -0,0 +1,31 @@
|
||||
--- 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");
|
64
iproute2-2.6.29-1-typelabels.diff
Normal file
64
iproute2-2.6.29-1-typelabels.diff
Normal file
@ -0,0 +1,64 @@
|
||||
--- 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 {
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 16 11:36:06 CEST 2009 - ms@suse.de
|
||||
|
||||
- fixed memory leak in read_igmp() function ip/ipmaddr.c (bnc #538996)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 11 00:44:10 CEST 2009 - ms@suse.de
|
||||
|
||||
- added support for monitoring neighbour tables (bnc #537906)
|
||||
- added support for displaying type labels (bnc #537906)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 28 16:18:11 CEST 2009 - ms@suse.de
|
||||
|
||||
|
@ -25,7 +25,7 @@ Group: Productivity/Networking/Routing
|
||||
Provides: iproute
|
||||
AutoReqProv: on
|
||||
Version: 2.6.29.1
|
||||
Release: 3
|
||||
Release: 4
|
||||
%define rversion 2.6.29-1
|
||||
Summary: Advanced Routing
|
||||
Url: http://developer.osdl.org/dev/iproute2/
|
||||
@ -41,6 +41,9 @@ 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
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%package -n libnetlink-devel
|
||||
@ -80,6 +83,9 @@ Authors:
|
||||
%patch8
|
||||
%patch9
|
||||
%patch10
|
||||
%patch11
|
||||
%patch12
|
||||
%patch13
|
||||
find . -name *.orig -print0 | xargs -r0 rm -v
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user