diff --git a/iproute.spec b/iproute.spec index 40f511e..82ba2ca 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.33 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System ##Source: iproute2-%{date_version}.tar.bz2 Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.bz2 @@ -17,10 +17,11 @@ Patch4: iproute2-sharepath.patch 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-6rd-tunnel.patch License: GPLv2+ and Public Domain BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: tetex-latex tetex-dvips linuxdoc-tools +BuildRequires: tex(latex) tex(dvips) linuxdoc-tools BuildRequires: flex linux-atm-libs-devel psutils db4-devel bison # introduction new iptables (xtables) which broke ipt Requires: iptables >= 1.4.1 @@ -48,6 +49,7 @@ The iproute documentation contains howtos and examples of settings. %patch5 -p1 -b .ipt %patch6 -p1 -b .ipproto %patch7 -p1 -b .fix_cbq +%patch8 -p1 -b .tunnel %build export LIBDIR=/%{_libdir} @@ -126,6 +128,10 @@ EOF %doc RELNOTES %changelog +* Tue Apr 20 2010 Marcela Mašláňová - 2.6.33-2 +- 578729 6rd tunnel correctly 3979ef91de9ed17d21672aaaefd6c228485135a2 +- change BR texlive to tex according to guidelines + * Thu Feb 25 2010 Marcela Mašláňová - 2.6.33-1 - update diff --git a/iproute2-6rd-tunnel.patch b/iproute2-6rd-tunnel.patch new file mode 100644 index 0000000..d38060f --- /dev/null +++ b/iproute2-6rd-tunnel.patch @@ -0,0 +1,84 @@ +From 3979ef91de9ed17d21672aaaefd6c228485135a2 Mon Sep 17 00:00:00 2001 +From: Alexandre Cassen +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 +--- + 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 + #include + #include ++#include + #include + #include + #include +@@ -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 +