refresh generic 2.6.22 patches
SVN-Revision: 11186
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
diff -urN linux-2.6.21.1.old/include/linux/rtnetlink.h linux-2.6.21.1.dev/include/linux/rtnetlink.h
|
||||
--- linux-2.6.21.1.old/include/linux/rtnetlink.h 2007-04-27 23:49:26.000000000 +0200
|
||||
+++ linux-2.6.21.1.dev/include/linux/rtnetlink.h 2007-05-26 20:46:11.883321560 +0200
|
||||
@@ -293,6 +293,8 @@
|
||||
Index: linux-2.6.22.19/include/linux/rtnetlink.h
|
||||
===================================================================
|
||||
--- linux-2.6.22.19.orig/include/linux/rtnetlink.h
|
||||
+++ linux-2.6.22.19/include/linux/rtnetlink.h
|
||||
@@ -293,6 +293,8 @@ struct rtnexthop
|
||||
#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */
|
||||
#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */
|
||||
#define RTNH_F_ONLINK 4 /* Gateway is forced on link */
|
||||
@@ -10,10 +11,11 @@ diff -urN linux-2.6.21.1.old/include/linux/rtnetlink.h linux-2.6.21.1.dev/includ
|
||||
|
||||
/* Macros to handle hexthops */
|
||||
|
||||
diff -urN linux-2.6.21.1.old/include/net/flow.h linux-2.6.21.1.dev/include/net/flow.h
|
||||
--- linux-2.6.21.1.old/include/net/flow.h 2007-04-27 23:49:26.000000000 +0200
|
||||
+++ linux-2.6.21.1.dev/include/net/flow.h 2007-05-26 20:46:11.922315632 +0200
|
||||
@@ -19,6 +19,8 @@
|
||||
Index: linux-2.6.22.19/include/net/flow.h
|
||||
===================================================================
|
||||
--- linux-2.6.22.19.orig/include/net/flow.h
|
||||
+++ linux-2.6.22.19/include/net/flow.h
|
||||
@@ -19,6 +19,8 @@ struct flowi {
|
||||
struct {
|
||||
__be32 daddr;
|
||||
__be32 saddr;
|
||||
@@ -22,7 +24,7 @@ diff -urN linux-2.6.21.1.old/include/net/flow.h linux-2.6.21.1.dev/include/net/f
|
||||
__u8 tos;
|
||||
__u8 scope;
|
||||
} ip4_u;
|
||||
@@ -43,6 +45,8 @@
|
||||
@@ -43,6 +45,8 @@ struct flowi {
|
||||
#define fl6_flowlabel nl_u.ip6_u.flowlabel
|
||||
#define fl4_dst nl_u.ip4_u.daddr
|
||||
#define fl4_src nl_u.ip4_u.saddr
|
||||
@@ -31,10 +33,11 @@ diff -urN linux-2.6.21.1.old/include/net/flow.h linux-2.6.21.1.dev/include/net/f
|
||||
#define fl4_tos nl_u.ip4_u.tos
|
||||
#define fl4_scope nl_u.ip4_u.scope
|
||||
|
||||
diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.c
|
||||
--- linux-2.6.21.1.old/net/ipv4/route.c 2007-04-27 23:49:26.000000000 +0200
|
||||
+++ linux-2.6.21.1.dev/net/ipv4/route.c 2007-05-26 20:46:11.967308792 +0200
|
||||
@@ -1208,6 +1208,7 @@
|
||||
Index: linux-2.6.22.19/net/ipv4/route.c
|
||||
===================================================================
|
||||
--- linux-2.6.22.19.orig/net/ipv4/route.c
|
||||
+++ linux-2.6.22.19/net/ipv4/route.c
|
||||
@@ -1208,6 +1208,7 @@ void ip_rt_redirect(__be32 old_gw, __be3
|
||||
|
||||
/* Gateway is different ... */
|
||||
rt->rt_gateway = new_gw;
|
||||
@@ -42,7 +45,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
|
||||
/* Redirect received -> path was valid */
|
||||
dst_confirm(&rth->u.dst);
|
||||
@@ -1643,6 +1644,7 @@
|
||||
@@ -1643,6 +1644,7 @@ static int ip_route_input_mc(struct sk_b
|
||||
rth->fl.fl4_tos = tos;
|
||||
rth->fl.mark = skb->mark;
|
||||
rth->fl.fl4_src = saddr;
|
||||
@@ -50,7 +53,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
rth->rt_src = saddr;
|
||||
#ifdef CONFIG_NET_CLS_ROUTE
|
||||
rth->u.dst.tclassid = itag;
|
||||
@@ -1653,6 +1655,7 @@
|
||||
@@ -1653,6 +1655,7 @@ static int ip_route_input_mc(struct sk_b
|
||||
dev_hold(rth->u.dst.dev);
|
||||
rth->idev = in_dev_get(rth->u.dst.dev);
|
||||
rth->fl.oif = 0;
|
||||
@@ -58,7 +61,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
rth->rt_gateway = daddr;
|
||||
rth->rt_spec_dst= spec_dst;
|
||||
rth->rt_type = RTN_MULTICAST;
|
||||
@@ -1716,7 +1719,7 @@
|
||||
@@ -1716,7 +1719,7 @@ static void ip_handle_martian_source(str
|
||||
static inline int __mkroute_input(struct sk_buff *skb,
|
||||
struct fib_result* res,
|
||||
struct in_device *in_dev,
|
||||
@@ -67,7 +70,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
struct rtable **result)
|
||||
{
|
||||
|
||||
@@ -1751,6 +1754,7 @@
|
||||
@@ -1751,6 +1754,7 @@ static inline int __mkroute_input(struct
|
||||
flags |= RTCF_DIRECTSRC;
|
||||
|
||||
if (out_dev == in_dev && err && !(flags & (RTCF_NAT | RTCF_MASQ)) &&
|
||||
@@ -75,7 +78,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
(IN_DEV_SHARED_MEDIA(out_dev) ||
|
||||
inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
|
||||
flags |= RTCF_DOREDIRECT;
|
||||
@@ -1788,6 +1792,7 @@
|
||||
@@ -1788,6 +1792,7 @@ static inline int __mkroute_input(struct
|
||||
rth->fl.mark = skb->mark;
|
||||
rth->fl.fl4_src = saddr;
|
||||
rth->rt_src = saddr;
|
||||
@@ -83,7 +86,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
rth->rt_gateway = daddr;
|
||||
rth->rt_iif =
|
||||
rth->fl.iif = in_dev->dev->ifindex;
|
||||
@@ -1795,6 +1800,7 @@
|
||||
@@ -1795,6 +1800,7 @@ static inline int __mkroute_input(struct
|
||||
dev_hold(rth->u.dst.dev);
|
||||
rth->idev = in_dev_get(rth->u.dst.dev);
|
||||
rth->fl.oif = 0;
|
||||
@@ -91,7 +94,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
rth->rt_spec_dst= spec_dst;
|
||||
|
||||
rth->u.dst.input = ip_forward;
|
||||
@@ -1816,19 +1822,21 @@
|
||||
@@ -1816,19 +1822,21 @@ static inline int ip_mkroute_input_def(s
|
||||
struct fib_result* res,
|
||||
const struct flowi *fl,
|
||||
struct in_device *in_dev,
|
||||
@@ -116,7 +119,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1841,7 +1849,8 @@
|
||||
@@ -1841,7 +1849,8 @@ static inline int ip_mkroute_input(struc
|
||||
struct fib_result* res,
|
||||
const struct flowi *fl,
|
||||
struct in_device *in_dev,
|
||||
@@ -126,7 +129,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
{
|
||||
#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
|
||||
struct rtable* rth = NULL, *rtres;
|
||||
@@ -1857,7 +1866,7 @@
|
||||
@@ -1857,7 +1866,7 @@ static inline int ip_mkroute_input(struc
|
||||
/* distinguish between multipath and singlepath */
|
||||
if (hopcount < 2)
|
||||
return ip_mkroute_input_def(skb, res, fl, in_dev, daddr,
|
||||
@@ -135,7 +138,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
|
||||
/* add all alternatives to the routing cache */
|
||||
for (hop = 0; hop < hopcount; hop++) {
|
||||
@@ -1869,7 +1878,7 @@
|
||||
@@ -1869,7 +1878,7 @@ static inline int ip_mkroute_input(struc
|
||||
|
||||
/* create a routing cache entry */
|
||||
err = __mkroute_input(skb, res, in_dev, daddr, saddr, tos,
|
||||
@@ -144,7 +147,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1889,7 +1898,7 @@
|
||||
@@ -1889,7 +1898,7 @@ static inline int ip_mkroute_input(struc
|
||||
skb->dst = &rtres->u.dst;
|
||||
return err;
|
||||
#else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */
|
||||
@@ -153,7 +156,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
#endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */
|
||||
}
|
||||
|
||||
@@ -1905,18 +1914,18 @@
|
||||
@@ -1905,18 +1914,18 @@ static inline int ip_mkroute_input(struc
|
||||
*/
|
||||
|
||||
static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
||||
@@ -175,7 +178,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
unsigned flags = 0;
|
||||
u32 itag = 0;
|
||||
struct rtable * rth;
|
||||
@@ -1949,6 +1958,12 @@
|
||||
@@ -1949,6 +1958,12 @@ static int ip_route_input_slow(struct sk
|
||||
if (BADCLASS(daddr) || ZERONET(daddr) || LOOPBACK(daddr))
|
||||
goto martian_destination;
|
||||
|
||||
@@ -188,7 +191,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
/*
|
||||
* Now we are ready to route packet.
|
||||
*/
|
||||
@@ -1958,6 +1973,10 @@
|
||||
@@ -1958,6 +1973,10 @@ static int ip_route_input_slow(struct sk
|
||||
goto no_route;
|
||||
}
|
||||
free_res = 1;
|
||||
@@ -199,7 +202,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
|
||||
RT_CACHE_STAT_INC(in_slow_tot);
|
||||
|
||||
@@ -1982,7 +2001,7 @@
|
||||
@@ -1982,7 +2001,7 @@ static int ip_route_input_slow(struct sk
|
||||
if (res.type != RTN_UNICAST)
|
||||
goto martian_destination;
|
||||
|
||||
@@ -208,7 +211,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
if (err == -ENOBUFS)
|
||||
goto e_nobufs;
|
||||
if (err == -EINVAL)
|
||||
@@ -1997,6 +2016,8 @@
|
||||
@@ -1997,6 +2016,8 @@ out: return err;
|
||||
brd_input:
|
||||
if (skb->protocol != htons(ETH_P_IP))
|
||||
goto e_inval;
|
||||
@@ -217,7 +220,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
|
||||
if (ZERONET(saddr))
|
||||
spec_dst = inet_select_addr(dev, 0, RT_SCOPE_LINK);
|
||||
@@ -2037,6 +2058,7 @@
|
||||
@@ -2037,6 +2058,7 @@ local_input:
|
||||
rth->u.dst.dev = &loopback_dev;
|
||||
dev_hold(rth->u.dst.dev);
|
||||
rth->idev = in_dev_get(rth->u.dst.dev);
|
||||
@@ -225,7 +228,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
rth->rt_gateway = daddr;
|
||||
rth->rt_spec_dst= spec_dst;
|
||||
rth->u.dst.input= ip_local_deliver;
|
||||
@@ -2086,8 +2108,9 @@
|
||||
@@ -2086,8 +2108,9 @@ martian_source:
|
||||
goto e_inval;
|
||||
}
|
||||
|
||||
@@ -237,7 +240,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
{
|
||||
struct rtable * rth;
|
||||
unsigned hash;
|
||||
@@ -2102,6 +2125,7 @@
|
||||
@@ -2102,6 +2125,7 @@ int ip_route_input(struct sk_buff *skb,
|
||||
if (rth->fl.fl4_dst == daddr &&
|
||||
rth->fl.fl4_src == saddr &&
|
||||
rth->fl.iif == iif &&
|
||||
@@ -245,7 +248,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
rth->fl.oif == 0 &&
|
||||
rth->fl.mark == skb->mark &&
|
||||
rth->fl.fl4_tos == tos) {
|
||||
@@ -2148,7 +2172,19 @@
|
||||
@@ -2148,7 +2172,19 @@ int ip_route_input(struct sk_buff *skb,
|
||||
rcu_read_unlock();
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -266,7 +269,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
}
|
||||
|
||||
static inline int __mkroute_output(struct rtable **result,
|
||||
@@ -2227,6 +2263,7 @@
|
||||
@@ -2227,6 +2263,7 @@ static inline int __mkroute_output(struc
|
||||
rth->fl.fl4_tos = tos;
|
||||
rth->fl.fl4_src = oldflp->fl4_src;
|
||||
rth->fl.oif = oldflp->oif;
|
||||
@@ -274,7 +277,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
rth->fl.mark = oldflp->mark;
|
||||
rth->rt_dst = fl->fl4_dst;
|
||||
rth->rt_src = fl->fl4_src;
|
||||
@@ -2367,6 +2404,7 @@
|
||||
@@ -2367,6 +2404,7 @@ static int ip_route_output_slow(struct r
|
||||
struct flowi fl = { .nl_u = { .ip4_u =
|
||||
{ .daddr = oldflp->fl4_dst,
|
||||
.saddr = oldflp->fl4_src,
|
||||
@@ -282,7 +285,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
.tos = tos & IPTOS_RT_MASK,
|
||||
.scope = ((tos & RTO_ONLINK) ?
|
||||
RT_SCOPE_LINK :
|
||||
@@ -2470,6 +2508,7 @@
|
||||
@@ -2470,6 +2508,7 @@ static int ip_route_output_slow(struct r
|
||||
dev_out = &loopback_dev;
|
||||
dev_hold(dev_out);
|
||||
fl.oif = loopback_dev.ifindex;
|
||||
@@ -290,7 +293,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
res.type = RTN_LOCAL;
|
||||
flags |= RTCF_LOCAL;
|
||||
goto make_route;
|
||||
@@ -2477,7 +2516,7 @@
|
||||
@@ -2477,7 +2516,7 @@ static int ip_route_output_slow(struct r
|
||||
|
||||
if (fib_lookup(&fl, &res)) {
|
||||
res.fi = NULL;
|
||||
@@ -299,7 +302,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
/* Apparently, routing tables are wrong. Assume,
|
||||
that the destination is on link.
|
||||
|
||||
@@ -2517,6 +2556,7 @@
|
||||
@@ -2517,6 +2556,7 @@ static int ip_route_output_slow(struct r
|
||||
dev_out = &loopback_dev;
|
||||
dev_hold(dev_out);
|
||||
fl.oif = dev_out->ifindex;
|
||||
@@ -307,7 +310,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
if (res.fi)
|
||||
fib_info_put(res.fi);
|
||||
res.fi = NULL;
|
||||
@@ -2524,13 +2564,12 @@
|
||||
@@ -2524,13 +2564,12 @@ static int ip_route_output_slow(struct r
|
||||
goto make_route;
|
||||
}
|
||||
|
||||
@@ -324,7 +327,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
|
||||
if (!fl.fl4_src)
|
||||
fl.fl4_src = FIB_RES_PREFSRC(res);
|
||||
@@ -2567,6 +2606,7 @@
|
||||
@@ -2567,6 +2606,7 @@ int __ip_route_output_key(struct rtable
|
||||
rth->fl.fl4_src == flp->fl4_src &&
|
||||
rth->fl.iif == 0 &&
|
||||
rth->fl.oif == flp->oif &&
|
||||
@@ -332,7 +335,7 @@ diff -urN linux-2.6.21.1.old/net/ipv4/route.c linux-2.6.21.1.dev/net/ipv4/route.
|
||||
rth->fl.mark == flp->mark &&
|
||||
!((rth->fl.fl4_tos ^ flp->fl4_tos) &
|
||||
(IPTOS_RT_MASK | RTO_ONLINK))) {
|
||||
@@ -3271,3 +3311,4 @@
|
||||
@@ -3267,3 +3307,4 @@ int __init ip_rt_init(void)
|
||||
EXPORT_SYMBOL(__ip_select_ident);
|
||||
EXPORT_SYMBOL(ip_route_input);
|
||||
EXPORT_SYMBOL(ip_route_output_key);
|
||||
|
||||
Reference in New Issue
Block a user