Don't print routes with negative metrics fix

This commit is contained in:
Petr Sabata 2010-09-21 11:00:45 +02:00
parent 7a940e7b0a
commit dbf80dbe89
2 changed files with 26 additions and 1 deletions

View File

@ -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@redhat.com> - 2.6.35-3
- Don't print routes with negative metric fix, rhbz#628739
* Wed Aug 18 2010 Petr Sabata <psabata@redhat.com> - 2.6.35-2
- 'ip route get' fix, iproute2-2.6.35-print-route.patch
- rhbz#622782

View File

@ -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");