- iproute-tc-priority.patch, rhbz#586112
This commit is contained in:
parent
fa0a165747
commit
061d3d5142
13
iproute.spec
13
iproute.spec
@ -4,12 +4,12 @@
|
|||||||
Summary: Advanced IP routing and network device configuration tools
|
Summary: Advanced IP routing and network device configuration tools
|
||||||
Name: iproute
|
Name: iproute
|
||||||
Version: 2.6.34
|
Version: 2.6.34
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
##Source: iproute2-%{date_version}.tar.bz2
|
##Source: iproute2-%{date_version}.tar.bz2
|
||||||
Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.bz2
|
Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.bz2
|
||||||
URL: http://linux-net.osdl.org/index.php/Iproute2
|
URL: http://linux-net.osdl.org/index.php/Iproute2
|
||||||
##Patch0: man-pages.patch
|
Patch0: man-pages.patch
|
||||||
Patch1: iproute2-2.6.29-kernel.patch
|
Patch1: iproute2-2.6.29-kernel.patch
|
||||||
Patch2: iproute2-ss050901-opt_flags.patch
|
Patch2: iproute2-ss050901-opt_flags.patch
|
||||||
Patch3: iproute2-2.6.25-segfault.patch
|
Patch3: iproute2-2.6.25-segfault.patch
|
||||||
@ -17,7 +17,7 @@ Patch4: iproute2-sharepath.patch
|
|||||||
Patch5: iproute2-2.6.31-tc_modules.patch
|
Patch5: iproute2-2.6.31-tc_modules.patch
|
||||||
Patch6: iproute2-2.6.29-IPPROTO_IP_for_SA.patch
|
Patch6: iproute2-2.6.29-IPPROTO_IP_for_SA.patch
|
||||||
Patch7: iproute2-example-cbq-service.patch
|
Patch7: iproute2-example-cbq-service.patch
|
||||||
#Patch8: iproute2-6rd-tunnel.patch
|
Patch8: iproute2-tc-priority.patch
|
||||||
|
|
||||||
License: GPLv2+ and Public Domain
|
License: GPLv2+ and Public Domain
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
@ -41,7 +41,7 @@ The iproute documentation contains howtos and examples of settings.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n iproute2-%{version}
|
%setup -q -n iproute2-%{version}
|
||||||
#patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1 -b .kernel
|
%patch1 -p1 -b .kernel
|
||||||
%patch2 -p1 -b .opt_flags
|
%patch2 -p1 -b .opt_flags
|
||||||
%patch3 -p1 -b .seg
|
%patch3 -p1 -b .seg
|
||||||
@ -49,7 +49,7 @@ The iproute documentation contains howtos and examples of settings.
|
|||||||
%patch5 -p1 -b .ipt
|
%patch5 -p1 -b .ipt
|
||||||
%patch6 -p1 -b .ipproto
|
%patch6 -p1 -b .ipproto
|
||||||
%patch7 -p1 -b .fix_cbq
|
%patch7 -p1 -b .fix_cbq
|
||||||
#patch8 -p1 -b .tunnel
|
%patch8 -p1 -b .tc_priority
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export LIBDIR=/%{_libdir}
|
export LIBDIR=/%{_libdir}
|
||||||
@ -128,6 +128,9 @@ EOF
|
|||||||
%doc RELNOTES
|
%doc RELNOTES
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 21 2010 Petr Sabata <psabata@redhat.com> - 2.6.34-2
|
||||||
|
- iproute-tc-priority.patch, rhbz#586112
|
||||||
|
|
||||||
* Mon Jun 21 2010 Petr Sabata <psabata@redhat.com> - 2.6.34-1
|
* Mon Jun 21 2010 Petr Sabata <psabata@redhat.com> - 2.6.34-1
|
||||||
- 2.6.34 version bump
|
- 2.6.34 version bump
|
||||||
|
|
||||||
|
@ -1,84 +0,0 @@
|
|||||||
From 3979ef91de9ed17d21672aaaefd6c228485135a2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alexandre Cassen <acassen@freebox.fr>
|
|
||||||
Date: Sun, 4 Apr 2010 22:40:14 +0200
|
|
||||||
Subject: [PATCH] Detect 6rd kernel missing support / 6rd tunnel scope
|
|
||||||
|
|
||||||
This patch fix two issues:
|
|
||||||
|
|
||||||
* If kernel is not supporting 6rd then ioctl() call
|
|
||||||
will return EINVAL, if so just skip perror call.
|
|
||||||
|
|
||||||
* 6rd scope is ipv6/ip tunnels. Dont try to fetch
|
|
||||||
6rd tunnel parms if tunnel protocol != IPPROTO_IPV6.
|
|
||||||
|
|
||||||
Signed-off-by: Alexandre Cassen <acassen@freebox.fr>
|
|
||||||
---
|
|
||||||
ip/iptunnel.c | 2 +-
|
|
||||||
ip/tunnel.c | 11 ++++++-----
|
|
||||||
2 files changed, 7 insertions(+), 6 deletions(-)
|
|
||||||
|
|
||||||
diff --git iproute2-2.6.33/ip/iptunnel.c iproute2-2.6.33/ip/iptunnel.c
|
|
||||||
index 1cd9fbd..3525fbb 100644
|
|
||||||
--- iproute2-2.6.33/ip/iptunnel.c.old
|
|
||||||
+++ iproute2-2.6.33/ip/iptunnel.c
|
|
||||||
@@ -365,7 +365,7 @@ static void print_tunnel(struct ip_tunnel_parm *p)
|
|
||||||
if (!(p->iph.frag_off&htons(IP_DF)))
|
|
||||||
printf(" nopmtudisc");
|
|
||||||
|
|
||||||
- if (!tnl_ioctl_get_6rd(p->name, &ip6rd) && ip6rd.prefixlen) {
|
|
||||||
+ if (p->iph.protocol == IPPROTO_IPV6 && !tnl_ioctl_get_6rd(p->name, &ip6rd) && ip6rd.prefixlen) {
|
|
||||||
printf(" 6rd-prefix %s/%u ",
|
|
||||||
inet_ntop(AF_INET6, &ip6rd.prefix, s1, sizeof(s1)),
|
|
||||||
ip6rd.prefixlen);
|
|
||||||
diff --git iproute2-2.6.33/ip/tunnel.c iproute2-2.6.33/ip/tunnel.c
|
|
||||||
index d389e86..6efbd2d 100644
|
|
||||||
--- iproute2-2.6.33/ip/tunnel.c.old
|
|
||||||
+++ iproute2-2.6.33/ip/tunnel.c
|
|
||||||
@@ -26,6 +26,7 @@
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
+#include <errno.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
@@ -168,7 +169,7 @@ int tnl_del_ioctl(const char *basedev, const char *name, void *p)
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static int tnl_gen_ioctl(int cmd, const char *name, void *p)
|
|
||||||
+static int tnl_gen_ioctl(int cmd, const char *name, void *p, int skiperr)
|
|
||||||
{
|
|
||||||
struct ifreq ifr;
|
|
||||||
int fd;
|
|
||||||
@@ -178,7 +179,7 @@ static int tnl_gen_ioctl(int cmd, const char *name, void *p)
|
|
||||||
ifr.ifr_ifru.ifru_data = p;
|
|
||||||
fd = socket(preferred_family, SOCK_DGRAM, 0);
|
|
||||||
err = ioctl(fd, cmd, &ifr);
|
|
||||||
- if (err)
|
|
||||||
+ if (err && errno != skiperr)
|
|
||||||
perror("ioctl");
|
|
||||||
close(fd);
|
|
||||||
return err;
|
|
||||||
@@ -186,15 +187,15 @@ static int tnl_gen_ioctl(int cmd, const char *name, void *p)
|
|
||||||
|
|
||||||
int tnl_prl_ioctl(int cmd, const char *name, void *p)
|
|
||||||
{
|
|
||||||
- return tnl_gen_ioctl(cmd, name, p);
|
|
||||||
+ return tnl_gen_ioctl(cmd, name, p, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
int tnl_6rd_ioctl(int cmd, const char *name, void *p)
|
|
||||||
{
|
|
||||||
- return tnl_gen_ioctl(cmd, name, p);
|
|
||||||
+ return tnl_gen_ioctl(cmd, name, p, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
int tnl_ioctl_get_6rd(const char *name, void *p)
|
|
||||||
{
|
|
||||||
- return tnl_gen_ioctl(SIOCGET6RD, name, p);
|
|
||||||
+ return tnl_gen_ioctl(SIOCGET6RD, name, p, EINVAL);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
1.7.0.1
|
|
||||||
|
|
57
iproute2-tc-priority.patch
Normal file
57
iproute2-tc-priority.patch
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
diff --git a/tc/f_u32.c b/tc/f_u32.c
|
||||||
|
index 4f5f74e..290595c 100644
|
||||||
|
--- a/tc/f_u32.c
|
||||||
|
+++ b/tc/f_u32.c
|
||||||
|
@@ -403,6 +403,43 @@ static int parse_ip6_addr(int *argc_p, char ***argv_p,
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int parse_ip6_class(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
|
||||||
|
+{
|
||||||
|
+ int res = -1;
|
||||||
|
+ int argc = *argc_p;
|
||||||
|
+ char **argv = *argv_p;
|
||||||
|
+ __u32 key;
|
||||||
|
+ __u32 mask;
|
||||||
|
+ int offmask = 0;
|
||||||
|
+
|
||||||
|
+ if (argc < 2)
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
+ if (get_u32(&key, *argv, 0))
|
||||||
|
+ return -1;
|
||||||
|
+ argc--; argv++;
|
||||||
|
+
|
||||||
|
+ if (get_u32(&mask, *argv, 16))
|
||||||
|
+ return -1;
|
||||||
|
+ argc--; argv++;
|
||||||
|
+
|
||||||
|
+ if (key > 0xFF || mask > 0xFF)
|
||||||
|
+ return -1;
|
||||||
|
+
|
||||||
|
+ key <<= 20;
|
||||||
|
+ mask <<= 20;
|
||||||
|
+ key = htonl(key);
|
||||||
|
+ mask = htonl(mask);
|
||||||
|
+
|
||||||
|
+ if (res = pack_key(sel, key, mask, 0, offmask) < 0)
|
||||||
|
+ return -1;
|
||||||
|
+ res = 0;
|
||||||
|
+
|
||||||
|
+ *argc_p = argc;
|
||||||
|
+ *argv_p = argv;
|
||||||
|
+ return res;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int parse_ether_addr(int *argc_p, char ***argv_p,
|
||||||
|
struct tc_u32_sel *sel, int off)
|
||||||
|
{
|
||||||
|
@@ -522,7 +559,7 @@ static int parse_ip6(int *argc_p, char ***argv_p, struct tc_u32_sel *sel)
|
||||||
|
res = parse_ip6_addr(&argc, &argv, sel, 24);
|
||||||
|
} else if (strcmp(*argv, "priority") == 0) {
|
||||||
|
NEXT_ARG();
|
||||||
|
- res = parse_u8(&argc, &argv, sel, 4, 0);
|
||||||
|
+ res = parse_ip6_class(&argc, &argv, sel);
|
||||||
|
} else if (strcmp(*argv, "protocol") == 0) {
|
||||||
|
NEXT_ARG();
|
||||||
|
res = parse_u8(&argc, &argv, sel, 6, 0);
|
@ -83,15 +83,3 @@ diff -up iproute2-2.6.29/iproute2-2.6.29/man/man8/ip.8.mm iproute2-2.6.29/iprout
|
|||||||
.B ssthresh
|
.B ssthresh
|
||||||
.IR REALM " ] [ "
|
.IR REALM " ] [ "
|
||||||
.B realms
|
.B realms
|
||||||
@@ -1480,6 +1482,11 @@ the clamp for congestion window. It is
|
|
||||||
flag is not used.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
+.BI initcwnd " NUMBER "
|
|
||||||
+the maximum initial congestion window (cwnd) size in MSS of a
|
|
||||||
+TCP connection.
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
.BI advmss " NUMBER " "(2.3.15+ only)"
|
|
||||||
the MSS ('Maximal Segment Size') to advertise to these
|
|
||||||
destinations when establishing TCP connections. If it is not given,
|
|
||||||
|
Loading…
Reference in New Issue
Block a user