diff --git a/iproute2-2.6.29-1-memleak.diff b/iproute2-2.6.29-1-memleak.diff new file mode 100644 index 0000000..87fd52f --- /dev/null +++ b/iproute2-2.6.29-1-memleak.diff @@ -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); diff --git a/iproute2-2.6.29-1-neightable.diff b/iproute2-2.6.29-1-neightable.diff new file mode 100644 index 0000000..3fed27f --- /dev/null +++ b/iproute2-2.6.29-1-neightable.diff @@ -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"); diff --git a/iproute2-2.6.29-1-typelabels.diff b/iproute2-2.6.29-1-typelabels.diff new file mode 100644 index 0000000..18be9b4 --- /dev/null +++ b/iproute2-2.6.29-1-typelabels.diff @@ -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 { diff --git a/iproute2.changes b/iproute2.changes index 83e7fdd..101dc96 100644 --- a/iproute2.changes +++ b/iproute2.changes @@ -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 diff --git a/iproute2.spec b/iproute2.spec index c7ba995..8428b5f 100644 --- a/iproute2.spec +++ b/iproute2.spec @@ -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