[iproute/f14/master] Don't print routes with negative metrics fix

Petr Sabata psabata at fedoraproject.org
Tue Sep 21 09:00:59 UTC 2010


commit dbf80dbe896fd0303cf02d8f5209ca748dda1672
Author: Petr Sabata <psabata at redhat.com>
Date:   Tue Sep 21 11:00:45 2010 +0200

    Don't print routes with negative metrics fix

 iproute.spec                   |    7 ++++++-
 iproute2-print-route-u32.patch |   20 ++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/iproute.spec b/iproute.spec
index 1074b0e..ffd3452 100644
--- a/iproute.spec
+++ b/iproute.spec
@@ -4,7 +4,7 @@
 Summary: Advanced IP routing and network device configuration tools
 Name: iproute
 Version: 2.6.35
-Release: 2%{?dist}
+Release: 3%{?dist}
 Group: Applications/System
 ##Source: iproute2-%{date_version}.tar.bz2
 Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.bz2
@@ -18,6 +18,7 @@ Patch5: iproute2-2.6.31-tc_modules.patch
 Patch6: iproute2-2.6.29-IPPROTO_IP_for_SA.patch
 Patch7: iproute2-example-cbq-service.patch
 Patch8: iproute2-2.6.35-print-route.patch
+Patch9: iproute2-print-route-u32.patch
 
 License: GPLv2+ and Public Domain
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -51,6 +52,7 @@ The iproute documentation contains howtos and examples of settings.
 %patch6 -p1 -b .ipproto
 %patch7 -p1 -b .fix_cbq
 %patch8 -p1 -b .print-route
+%patch9 -p1 -b .print-route-u32
 
 %build
 export LIBDIR=/%{_libdir}
@@ -132,6 +134,9 @@ EOF
 %doc RELNOTES
 
 %changelog
+* Tue Sep 21 2010 Petr Sabata <psabata at redhat.com> - 2.6.35-3
+- Don't print routes with negative metric fix, rhbz#628739
+
 * Wed Aug 18 2010 Petr Sabata <psabata at redhat.com> - 2.6.35-2
 - 'ip route get' fix, iproute2-2.6.35-print-route.patch
 - rhbz#622782
diff --git a/iproute2-print-route-u32.patch b/iproute2-print-route-u32.patch
new file mode 100644
index 0000000..48920d8
--- /dev/null
+++ b/iproute2-print-route-u32.patch
@@ -0,0 +1,20 @@
+--- iproute2-2.6.35/ip/iproute.c	2010-08-31 13:01:39.151185561 +0200
++++ iproute2-print-route-u32.c	    2010-08-31 13:41:04.072928779 +0200
+@@ -368,7 +368,7 @@
+ 				    abuf, sizeof(abuf)));
+ 	}
+ 	if (tb[RTA_PRIORITY])
+-		fprintf(fp, " metric %d ", *(__u32*)RTA_DATA(tb[RTA_PRIORITY]));
++		fprintf(fp, " metric %u ", *(__u32*)RTA_DATA(tb[RTA_PRIORITY]));
+ 	if (r->rtm_flags & RTNH_F_DEAD)
+ 		fprintf(fp, "dead ");
+ 	if (r->rtm_flags & RTNH_F_ONLINK)
+@@ -487,7 +487,7 @@
+ 			if (i < sizeof(mx_names)/sizeof(char*) && mx_names[i])
+ 				fprintf(fp, " %s", mx_names[i]);
+ 			else
+-				fprintf(fp, " metric %d", i);
++				fprintf(fp, " metric %u", i);
+ 			if (mxlock & (1<<i))
+ 				fprintf(fp, " lock");
+ 


More information about the scm-commits mailing list