packages: kernel/kernel-routes.patch, kernel/kernel.spec - update routes pa...

arekm arekm at pld-linux.org
Sat Oct 23 15:55:51 CEST 2010


Author: arekm                        Date: Sat Oct 23 13:55:51 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- update routes patch for 2.6.36

---- Files affected:
packages/kernel:
   kernel-routes.patch (1.10 -> 1.11) , kernel.spec (1.850 -> 1.851) 

---- Diffs:

================================================================
Index: packages/kernel/kernel-routes.patch
diff -u packages/kernel/kernel-routes.patch:1.10 packages/kernel/kernel-routes.patch:1.11
--- packages/kernel/kernel-routes.patch:1.10	Thu Aug  5 21:52:26 2010
+++ packages/kernel/kernel-routes.patch	Sat Oct 23 15:55:45 2010
@@ -1,7 +1,7 @@
-diff -urp v2.6.35/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h
---- v2.6.35/linux/include/linux/rtnetlink.h	2010-08-02 09:37:48.000000000 +0300
-+++ linux/include/linux/rtnetlink.h	2010-08-03 00:24:10.000000000 +0300
-@@ -311,6 +311,8 @@ struct rtnexthop {
+diff -urp v2.6.36/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h
+--- v2.6.36/linux/include/linux/rtnetlink.h	2010-10-22 11:34:37.000000000 +0300
++++ linux/include/linux/rtnetlink.h	2010-10-23 15:03:19.704274198 +0300
+@@ -312,6 +312,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,9 +10,9 @@
  
  /* Macros to handle hexthops */
  
-diff -urp v2.6.35/linux/include/net/flow.h linux/include/net/flow.h
---- v2.6.35/linux/include/net/flow.h	2010-08-02 09:37:48.000000000 +0300
-+++ linux/include/net/flow.h	2010-08-03 00:24:45.000000000 +0300
+diff -urp v2.6.36/linux/include/net/flow.h linux/include/net/flow.h
+--- v2.6.36/linux/include/net/flow.h	2010-08-02 09:37:48.000000000 +0300
++++ linux/include/net/flow.h	2010-10-23 15:04:36.408274819 +0300
 @@ -19,6 +19,8 @@ struct flowi {
  		struct {
  			__be32			daddr;
@@ -31,9 +31,9 @@
  #define fl4_tos		nl_u.ip4_u.tos
  #define fl4_scope	nl_u.ip4_u.scope
  
-diff -urp v2.6.35/linux/include/net/ip_fib.h linux/include/net/ip_fib.h
---- v2.6.35/linux/include/net/ip_fib.h	2010-02-25 09:01:36.000000000 +0200
-+++ linux/include/net/ip_fib.h	2010-08-03 00:24:10.000000000 +0300
+diff -urp v2.6.36/linux/include/net/ip_fib.h linux/include/net/ip_fib.h
+--- v2.6.36/linux/include/net/ip_fib.h	2010-02-25 09:01:36.000000000 +0200
++++ linux/include/net/ip_fib.h	2010-10-23 15:03:19.704274198 +0300
 @@ -207,6 +207,8 @@ extern int fib_lookup(struct net *n, str
  extern struct fib_table *fib_new_table(struct net *net, u32 id);
  extern struct fib_table *fib_get_table(struct net *net, u32 id);
@@ -50,9 +50,9 @@
 +extern rwlock_t fib_nhflags_lock;
 +
  #endif  /* _NET_FIB_H */
-diff -urp v2.6.35/linux/include/net/netfilter/nf_nat.h linux/include/net/netfilter/nf_nat.h
---- v2.6.35/linux/include/net/netfilter/nf_nat.h	2010-02-25 09:01:36.000000000 +0200
-+++ linux/include/net/netfilter/nf_nat.h	2010-08-03 00:24:45.000000000 +0300
+diff -urp v2.6.36/linux/include/net/netfilter/nf_nat.h linux/include/net/netfilter/nf_nat.h
+--- v2.6.36/linux/include/net/netfilter/nf_nat.h	2010-02-25 09:01:36.000000000 +0200
++++ linux/include/net/netfilter/nf_nat.h	2010-10-23 15:04:36.408274819 +0300
 @@ -73,6 +73,13 @@ struct nf_conn_nat {
  #endif
  };
@@ -67,10 +67,10 @@
  /* Set up the info structure to map into this range. */
  extern unsigned int nf_nat_setup_info(struct nf_conn *ct,
  				      const struct nf_nat_range *range,
-diff -urp v2.6.35/linux/include/net/route.h linux/include/net/route.h
---- v2.6.35/linux/include/net/route.h	2010-08-02 09:37:48.000000000 +0300
-+++ linux/include/net/route.h	2010-08-03 00:26:00.000000000 +0300
-@@ -128,6 +128,7 @@ static inline int ip_route_input_noref(s
+diff -urp v2.6.36/linux/include/net/route.h linux/include/net/route.h
+--- v2.6.36/linux/include/net/route.h	2010-10-22 11:34:37.000000000 +0300
++++ linux/include/net/route.h	2010-10-23 15:04:36.409274028 +0300
+@@ -126,6 +126,7 @@ static inline int ip_route_input_noref(s
  	return ip_route_input_common(skb, dst, src, tos, devin, true);
  }
  
@@ -78,10 +78,10 @@
  extern unsigned short	ip_rt_frag_needed(struct net *net, struct iphdr *iph, unsigned short new_mtu, struct net_device *dev);
  extern void		ip_rt_send_redirect(struct sk_buff *skb);
  
-diff -urp v2.6.35/linux/net/bridge/br_netfilter.c linux/net/bridge/br_netfilter.c
---- v2.6.35/linux/net/bridge/br_netfilter.c	2010-08-02 09:37:49.000000000 +0300
-+++ linux/net/bridge/br_netfilter.c	2010-08-03 00:24:45.000000000 +0300
-@@ -334,6 +334,9 @@ static int br_nf_pre_routing_finish(stru
+diff -urp v2.6.36/linux/net/bridge/br_netfilter.c linux/net/bridge/br_netfilter.c
+--- v2.6.36/linux/net/bridge/br_netfilter.c	2010-10-22 11:34:37.000000000 +0300
++++ linux/net/bridge/br_netfilter.c	2010-10-23 15:04:36.410274544 +0300
+@@ -337,6 +337,9 @@ static int br_nf_pre_routing_finish(stru
  	struct rtable *rt;
  	int err;
  
@@ -91,9 +91,9 @@
  	if (nf_bridge->mask & BRNF_PKT_TYPE) {
  		skb->pkt_type = PACKET_OTHERHOST;
  		nf_bridge->mask ^= BRNF_PKT_TYPE;
-diff -urp v2.6.35/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c
---- v2.6.35/linux/net/ipv4/fib_frontend.c	2010-05-17 10:49:01.000000000 +0300
-+++ linux/net/ipv4/fib_frontend.c	2010-08-03 00:24:10.000000000 +0300
+diff -urp v2.6.36/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c
+--- v2.6.36/linux/net/ipv4/fib_frontend.c	2010-10-22 11:34:38.000000000 +0300
++++ linux/net/ipv4/fib_frontend.c	2010-10-23 15:03:19.706274107 +0300
 @@ -47,6 +47,8 @@
  
  #ifndef CONFIG_IP_MULTIPLE_TABLES
@@ -122,7 +122,7 @@
  		fib_table_select_default(tb, flp, res);
  }
  
-@@ -242,6 +247,9 @@ int fib_validate_source(__be32 src, __be
+@@ -245,6 +250,9 @@ int fib_validate_source(__be32 src, __be
  			    .iif = oif };
  
  	struct fib_result res;
@@ -130,19 +130,9 @@
 +	unsigned char prefixlen;
 +	unsigned char scope;
  	int no_addr, rpf, accept_local;
+ 	bool dev_match;
  	int ret;
- 	struct net *net;
-@@ -270,31 +278,35 @@ int fib_validate_source(__be32 src, __be
- 	}
- 	*spec_dst = FIB_RES_PREFSRC(res);
- 	fib_combine_itag(itag, &res);
--#ifdef CONFIG_IP_ROUTE_MULTIPATH
--	if (FIB_RES_DEV(res) == dev || res.fi->fib_nhs > 1)
--#else
- 	if (FIB_RES_DEV(res) == dev)
--#endif
- 	{
- 		ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST;
+@@ -294,21 +302,29 @@ int fib_validate_source(__be32 src, __be
  		fib_res_put(&res);
  		return ret;
  	}
@@ -153,7 +143,7 @@
  	if (no_addr)
  		goto last_resort;
 -	if (rpf == 1)
--		goto e_inval;
+-		goto e_rpf;
  	fl.oif = dev->ifindex;
  
  	ret = 0;
@@ -171,11 +161,11 @@
  		fib_res_put(&res);
  	}
 +	if (rpf == 1)
-+		goto e_inval;
++		goto e_rpf;
  	return ret;
  
  last_resort:
-@@ -917,9 +929,7 @@ static int fib_inetaddr_event(struct not
+@@ -933,9 +949,7 @@ static int fib_inetaddr_event(struct not
  	switch (event) {
  	case NETDEV_UP:
  		fib_add_ifaddr(ifa);
@@ -185,7 +175,7 @@
  		rt_cache_flush(dev_net(dev), -1);
  		break;
  	case NETDEV_DOWN:
-@@ -955,9 +965,7 @@ static int fib_netdev_event(struct notif
+@@ -971,9 +985,7 @@ static int fib_netdev_event(struct notif
  		for_ifa(in_dev) {
  			fib_add_ifaddr(ifa);
  		} endfor_ifa(in_dev);
@@ -195,9 +185,9 @@
  		rt_cache_flush(dev_net(dev), -1);
  		break;
  	case NETDEV_DOWN:
-diff -urp v2.6.35/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c
---- v2.6.35/linux/net/ipv4/fib_hash.c	2010-05-17 10:49:01.000000000 +0300
-+++ linux/net/ipv4/fib_hash.c	2010-08-03 00:24:10.000000000 +0300
+diff -urp v2.6.36/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c
+--- v2.6.36/linux/net/ipv4/fib_hash.c	2010-05-17 10:49:01.000000000 +0300
++++ linux/net/ipv4/fib_hash.c	2010-10-23 15:03:19.707274360 +0300
 @@ -278,25 +278,35 @@ out:
  void fib_table_select_default(struct fib_table *tb,
  			      const struct flowi *flp, struct fib_result *res)
@@ -324,9 +314,9 @@
  
  	/*
  	 * Insert new entry to the list.
-diff -urp v2.6.35/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h
---- v2.6.35/linux/net/ipv4/fib_lookup.h	2009-09-11 10:27:17.000000000 +0300
-+++ linux/net/ipv4/fib_lookup.h	2010-08-03 00:24:10.000000000 +0300
+diff -urp v2.6.36/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h
+--- v2.6.36/linux/net/ipv4/fib_lookup.h	2009-09-11 10:27:17.000000000 +0300
++++ linux/net/ipv4/fib_lookup.h	2010-10-23 15:03:19.707274360 +0300
 @@ -8,6 +8,7 @@
  struct fib_alias {
  	struct list_head	fa_list;
@@ -345,9 +335,9 @@
  
  static inline void fib_result_assign(struct fib_result *res,
  				     struct fib_info *fi)
-diff -urp v2.6.35/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c
---- v2.6.35/linux/net/ipv4/fib_rules.c	2010-08-02 09:37:49.000000000 +0300
-+++ linux/net/ipv4/fib_rules.c	2010-08-03 00:24:10.000000000 +0300
+diff -urp v2.6.36/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c
+--- v2.6.36/linux/net/ipv4/fib_rules.c	2010-08-02 09:37:49.000000000 +0300
++++ linux/net/ipv4/fib_rules.c	2010-10-23 15:03:19.708274528 +0300
 @@ -54,6 +54,11 @@ u32 fib_rules_tclass(struct fib_result *
  }
  #endif
@@ -360,9 +350,9 @@
  int fib_lookup(struct net *net, struct flowi *flp, struct fib_result *res)
  {
  	struct fib_lookup_arg arg = {
-diff -urp v2.6.35/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c
---- v2.6.35/linux/net/ipv4/fib_semantics.c	2010-05-17 10:49:01.000000000 +0300
-+++ linux/net/ipv4/fib_semantics.c	2010-08-03 00:24:45.000000000 +0300
+diff -urp v2.6.36/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c
+--- v2.6.36/linux/net/ipv4/fib_semantics.c	2010-05-17 10:49:01.000000000 +0300
++++ linux/net/ipv4/fib_semantics.c	2010-10-23 15:04:36.412272841 +0300
 @@ -51,6 +51,7 @@ static struct hlist_head *fib_info_hash;
  static struct hlist_head *fib_info_laddrhash;
  static unsigned int fib_hash_size;
@@ -814,10 +804,10 @@
  	spin_unlock_bh(&fib_multipath_lock);
  }
  #endif
-diff -urp v2.6.35/linux/net/ipv4/fib_trie.c linux/net/ipv4/fib_trie.c
---- v2.6.35/linux/net/ipv4/fib_trie.c	2010-08-02 09:37:49.000000000 +0300
-+++ linux/net/ipv4/fib_trie.c	2010-08-03 00:24:10.000000000 +0300
-@@ -1275,6 +1275,7 @@ int fib_table_insert(struct fib_table *t
+diff -urp v2.6.36/linux/net/ipv4/fib_trie.c linux/net/ipv4/fib_trie.c
+--- v2.6.36/linux/net/ipv4/fib_trie.c	2010-10-22 11:34:38.000000000 +0300
++++ linux/net/ipv4/fib_trie.c	2010-10-23 15:03:19.712272951 +0300
+@@ -1277,6 +1277,7 @@ int fib_table_insert(struct fib_table *t
  			fi_drop = fa->fa_info;
  			new_fa->fa_tos = fa->fa_tos;
  			new_fa->fa_info = fi;
@@ -825,7 +815,7 @@
  			new_fa->fa_type = cfg->fc_type;
  			new_fa->fa_scope = cfg->fc_scope;
  			state = fa->fa_state;
-@@ -1315,6 +1316,7 @@ int fib_table_insert(struct fib_table *t
+@@ -1317,6 +1318,7 @@ int fib_table_insert(struct fib_table *t
  	new_fa->fa_type = cfg->fc_type;
  	new_fa->fa_scope = cfg->fc_scope;
  	new_fa->fa_state = 0;
@@ -833,7 +823,7 @@
  	/*
  	 * Insert new entry to the list.
  	 */
-@@ -1815,24 +1817,31 @@ void fib_table_select_default(struct fib
+@@ -1819,24 +1821,31 @@ void fib_table_select_default(struct fib
  			      struct fib_result *res)
  {
  	struct trie *t = (struct trie *) tb->tb_data;
@@ -868,7 +858,7 @@
  	if (!fa_head)
  		goto out;
  
-@@ -1846,39 +1855,52 @@ void fib_table_select_default(struct fib
+@@ -1850,39 +1859,52 @@ void fib_table_select_default(struct fib
  		    fa->fa_type != RTN_UNICAST)
  			continue;
  
@@ -935,9 +925,9 @@
  out:
  	rcu_read_unlock();
  }
-diff -urp v2.6.35/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfilter/ipt_MASQUERADE.c
---- v2.6.35/linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2010-08-02 09:37:49.000000000 +0300
-+++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2010-08-03 00:26:47.000000000 +0300
+diff -urp v2.6.36/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfilter/ipt_MASQUERADE.c
+--- v2.6.36/linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2010-08-02 09:37:49.000000000 +0300
++++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2010-10-23 15:04:36.412272841 +0300
 @@ -51,7 +51,7 @@ masquerade_tg(struct sk_buff *skb, const
  	enum ip_conntrack_info ctinfo;
  	struct nf_nat_range newrange;
@@ -982,10 +972,10 @@
  	nat->masq_index = par->out->ifindex;
  
  	/* Transfer from original range. */
-diff -urp v2.6.35/linux/net/ipv4/netfilter/nf_nat_core.c linux/net/ipv4/netfilter/nf_nat_core.c
---- v2.6.35/linux/net/ipv4/netfilter/nf_nat_core.c	2010-05-17 10:49:01.000000000 +0300
-+++ linux/net/ipv4/netfilter/nf_nat_core.c	2010-08-03 00:24:45.000000000 +0300
-@@ -715,6 +715,52 @@ static struct pernet_operations nf_nat_n
+diff -urp v2.6.36/linux/net/ipv4/netfilter/nf_nat_core.c linux/net/ipv4/netfilter/nf_nat_core.c
+--- v2.6.36/linux/net/ipv4/netfilter/nf_nat_core.c	2010-10-22 11:34:38.000000000 +0300
++++ linux/net/ipv4/netfilter/nf_nat_core.c	2010-10-23 15:04:36.413274353 +0300
+@@ -706,6 +706,52 @@ static struct pernet_operations nf_nat_n
  	.exit = nf_nat_net_exit,
  };
  
@@ -1038,10 +1028,10 @@
  static int __init nf_nat_init(void)
  {
  	size_t i;
-diff -urp v2.6.35/linux/net/ipv4/netfilter/nf_nat_standalone.c linux/net/ipv4/netfilter/nf_nat_standalone.c
---- v2.6.35/linux/net/ipv4/netfilter/nf_nat_standalone.c	2010-08-02 09:37:49.000000000 +0300
-+++ linux/net/ipv4/netfilter/nf_nat_standalone.c	2010-08-03 00:24:45.000000000 +0300
-@@ -255,6 +255,14 @@ static struct nf_hook_ops nf_nat_ops[] _
+diff -urp v2.6.36/linux/net/ipv4/netfilter/nf_nat_standalone.c linux/net/ipv4/netfilter/nf_nat_standalone.c
+--- v2.6.36/linux/net/ipv4/netfilter/nf_nat_standalone.c	2010-10-22 11:34:38.000000000 +0300
++++ linux/net/ipv4/netfilter/nf_nat_standalone.c	2010-10-23 15:04:36.414274319 +0300
+@@ -249,6 +249,14 @@ static struct nf_hook_ops nf_nat_ops[] _
  		.hooknum	= NF_INET_PRE_ROUTING,
  		.priority	= NF_IP_PRI_NAT_DST,
  	},
@@ -1056,10 +1046,10 @@
  	/* After packet filtering, change source */
  	{
  		.hook		= nf_nat_out,
-diff -urp v2.6.35/linux/net/ipv4/route.c linux/net/ipv4/route.c
---- v2.6.35/linux/net/ipv4/route.c	2010-08-02 09:37:49.000000000 +0300
-+++ linux/net/ipv4/route.c	2010-08-03 00:32:04.000000000 +0300
-@@ -694,6 +694,8 @@ static inline int compare_keys(struct fl
+diff -urp v2.6.36/linux/net/ipv4/route.c linux/net/ipv4/route.c
+--- v2.6.36/linux/net/ipv4/route.c	2010-10-22 11:34:38.000000000 +0300
++++ linux/net/ipv4/route.c	2010-10-23 15:08:07.188273891 +0300
+@@ -693,6 +693,8 @@ static inline int compare_keys(struct fl
  	return (((__force u32)fl1->nl_u.ip4_u.daddr ^ (__force u32)fl2->nl_u.ip4_u.daddr) |
  		((__force u32)fl1->nl_u.ip4_u.saddr ^ (__force u32)fl2->nl_u.ip4_u.saddr) |
  		(fl1->mark ^ fl2->mark) |
@@ -1068,14 +1058,14 @@
  		(*(u16 *)&fl1->nl_u.ip4_u.tos ^ *(u16 *)&fl2->nl_u.ip4_u.tos) |
  		(fl1->oif ^ fl2->oif) |
  		(fl1->iif ^ fl2->iif)) == 0;
-@@ -1437,6 +1439,7 @@ void ip_rt_redirect(__be32 old_gw, __be3
+@@ -1435,6 +1437,7 @@ void ip_rt_redirect(__be32 old_gw, __be3
  
  				/* Gateway is different ... */
  				rt->rt_gateway		= new_gw;
 +				if (rt->fl.fl4_gw) rt->fl.fl4_gw = new_gw;
  
  				/* Redirect received -> path was valid */
- 				dst_confirm(&rth->u.dst);
+ 				dst_confirm(&rth->dst);
 @@ -1886,6 +1889,7 @@ static int ip_route_input_mc(struct sk_b
  	rth->fl.fl4_tos	= tos;
  	rth->fl.mark    = skb->mark;
@@ -1083,25 +1073,25 @@
 +	rth->fl.fl4_lsrc = 0;
  	rth->rt_src	= saddr;
  #ifdef CONFIG_NET_CLS_ROUTE
- 	rth->u.dst.tclassid = itag;
+ 	rth->dst.tclassid = itag;
 @@ -1896,6 +1900,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);
+ 	dev_hold(rth->dst.dev);
+ 	rth->idev	= in_dev_get(rth->dst.dev);
  	rth->fl.oif	= 0;
 +	rth->fl.fl4_gw	= 0;
  	rth->rt_gateway	= daddr;
  	rth->rt_spec_dst= spec_dst;
  	rth->rt_genid	= rt_genid(dev_net(dev));
-@@ -1960,7 +1965,7 @@ static int __mkroute_input(struct sk_buf
+@@ -1959,7 +1964,7 @@ static int __mkroute_input(struct sk_buf
  			   struct fib_result *res,
  			   struct in_device *in_dev,
  			   __be32 daddr, __be32 saddr, u32 tos,
 -			   struct rtable **result)
 +			   __be32 lsrc, struct rtable **result)
  {
- 
  	struct rtable *rth;
-@@ -1994,6 +1999,7 @@ static int __mkroute_input(struct sk_buf
+ 	int err;
+@@ -1991,6 +1996,7 @@ static int __mkroute_input(struct sk_buf
  		flags |= RTCF_DIRECTSRC;
  
  	if (out_dev == in_dev && err &&
@@ -1109,7 +1099,7 @@
  	    (IN_DEV_SHARED_MEDIA(out_dev) ||
  	     inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
  		flags |= RTCF_DOREDIRECT;
-@@ -2032,6 +2038,7 @@ static int __mkroute_input(struct sk_buf
+@@ -2029,6 +2035,7 @@ static int __mkroute_input(struct sk_buf
  	rth->fl.mark    = skb->mark;
  	rth->fl.fl4_src	= saddr;
  	rth->rt_src	= saddr;
@@ -1117,15 +1107,15 @@
  	rth->rt_gateway	= daddr;
  	rth->rt_iif 	=
  		rth->fl.iif	= in_dev->dev->ifindex;
-@@ -2039,6 +2046,7 @@ static int __mkroute_input(struct sk_buf
- 	dev_hold(rth->u.dst.dev);
- 	rth->idev	= in_dev_get(rth->u.dst.dev);
+@@ -2036,6 +2043,7 @@ static int __mkroute_input(struct sk_buf
+ 	dev_hold(rth->dst.dev);
+ 	rth->idev	= in_dev_get(rth->dst.dev);
  	rth->fl.oif 	= 0;
 +	rth->fl.fl4_gw	= 0;
  	rth->rt_spec_dst= spec_dst;
  
- 	rth->u.dst.obsolete = -1;
-@@ -2060,21 +2068,23 @@ static int __mkroute_input(struct sk_buf
+ 	rth->dst.obsolete = -1;
+@@ -2055,21 +2063,23 @@ static int __mkroute_input(struct sk_buf
  
  static int ip_mkroute_input(struct sk_buff *skb,
  			    struct fib_result *res,
@@ -1152,7 +1142,7 @@
  	if (err)
  		return err;
  
-@@ -2095,18 +2105,19 @@ static int ip_mkroute_input(struct sk_bu
+@@ -2090,18 +2100,20 @@ static int ip_mkroute_input(struct sk_bu
   */
  
  static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
@@ -1160,7 +1150,7 @@
 +			       u8 tos, struct net_device *dev, __be32 lsrc)
  {
  	struct fib_result res;
- 	struct in_device *in_dev = in_dev_get(dev);
+ 	struct in_device *in_dev = __in_dev_get_rcu(dev);
  	struct flowi fl = { .nl_u = { .ip4_u =
  				      { .daddr = daddr,
 -					.saddr = saddr,
@@ -1171,11 +1161,12 @@
  			    .mark = skb->mark,
 -			    .iif = dev->ifindex };
 +			    .iif = lsrc?
-+				dev_net(dev)->loopback_dev->ifindex : dev->ifindex };
++					dev_net(dev)->loopback_dev->ifindex :
++					dev->ifindex };
  	unsigned	flags = 0;
  	u32		itag = 0;
  	struct rtable * rth;
-@@ -2142,6 +2153,12 @@ static int ip_route_input_slow(struct sk
+@@ -2137,6 +2149,12 @@ static int ip_route_input_slow(struct sk
  	    ipv4_is_loopback(daddr))
  		goto martian_destination;
  
@@ -1188,7 +1179,7 @@
  	/*
  	 *	Now we are ready to route packet.
  	 */
-@@ -2151,6 +2168,8 @@ static int ip_route_input_slow(struct sk
+@@ -2146,6 +2164,8 @@ static int ip_route_input_slow(struct sk
  		goto no_route;
  	}
  	free_res = 1;
@@ -1197,16 +1188,16 @@
  
  	RT_CACHE_STAT_INC(in_slow_tot);
  
-@@ -2175,7 +2194,7 @@ static int ip_route_input_slow(struct sk
+@@ -2169,7 +2189,7 @@ static int ip_route_input_slow(struct sk
  	if (res.type != RTN_UNICAST)
  		goto martian_destination;
  
 -	err = ip_mkroute_input(skb, &res, &fl, in_dev, daddr, saddr, tos);
 +	err = ip_mkroute_input(skb, &res, net, &fl, in_dev, daddr, saddr, tos, lsrc);
  done:
- 	in_dev_put(in_dev);
  	if (free_res)
-@@ -2185,6 +2204,8 @@ out:	return err;
+ 		fib_res_put(&res);
+@@ -2178,6 +2198,8 @@ out:	return err;
  brd_input:
  	if (skb->protocol != htons(ETH_P_IP))
  		goto e_inval;
@@ -1215,16 +1206,16 @@
  
  	if (ipv4_is_zeronet(saddr))
  		spec_dst = inet_select_addr(dev, 0, RT_SCOPE_LINK);
-@@ -2227,6 +2248,7 @@ local_input:
- 	rth->u.dst.dev	= net->loopback_dev;
- 	dev_hold(rth->u.dst.dev);
- 	rth->idev	= in_dev_get(rth->u.dst.dev);
+@@ -2220,6 +2242,7 @@ local_input:
+ 	rth->dst.dev	= net->loopback_dev;
+ 	dev_hold(rth->dst.dev);
+ 	rth->idev	= in_dev_get(rth->dst.dev);
 +	rth->fl.fl4_gw	= 0;
  	rth->rt_gateway	= daddr;
  	rth->rt_spec_dst= spec_dst;
- 	rth->u.dst.input= ip_local_deliver;
-@@ -2277,8 +2299,9 @@ martian_source:
- 	goto e_inval;
+ 	rth->dst.input= ip_local_deliver;
+@@ -2272,8 +2295,9 @@ martian_source_keep_err:
+ 	goto done;
  }
  
 -int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr,
@@ -1235,7 +1226,7 @@
  {
  	struct rtable * rth;
  	unsigned	hash;
-@@ -2299,6 +2322,7 @@ int ip_route_input_common(struct sk_buff
+@@ -2296,6 +2320,7 @@ int ip_route_input_common(struct sk_buff
  		if ((((__force u32)rth->fl.fl4_dst ^ (__force u32)daddr) |
  		     ((__force u32)rth->fl.fl4_src ^ (__force u32)saddr) |
  		     (rth->fl.iif ^ iif) |
@@ -1243,19 +1234,21 @@
  		     rth->fl.oif |
  		     (rth->fl.fl4_tos ^ tos)) == 0 &&
  		    rth->fl.mark == skb->mark &&
-@@ -2353,10 +2377,22 @@ skip_cache:
+@@ -2349,12 +2374,25 @@ skip_cache:
  		rcu_read_unlock();
  		return -EINVAL;
  	}
--	return ip_route_input_slow(skb, daddr, saddr, tos, dev);
-+	return ip_route_input_slow(skb, daddr, saddr, tos, dev, lsrc);
-+}
+-	res = ip_route_input_slow(skb, daddr, saddr, tos, dev);
++	res = ip_route_input_slow(skb, daddr, saddr, tos, dev, lsrc);
+ 	rcu_read_unlock();
+ 	return res;
+ }
 +
 +int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr,
 +		   u8 tos, struct net_device *dev, bool noref)
 +{
 +	return ip_route_input_cached(skb, daddr, saddr, tos, dev, noref, 0);
- }
++}
  EXPORT_SYMBOL(ip_route_input_common);
  
 +int ip_route_input_lookup(struct sk_buff *skb, __be32 daddr, __be32 saddr,
@@ -1263,11 +1256,12 @@
 +{
 +	return ip_route_input_cached(skb, daddr, saddr, tos, dev, true, lsrc);
 +}
++EXPORT_SYMBOL(ip_route_input_lookup);
 +
  static int __mkroute_output(struct rtable **result,
  			    struct fib_result *res,
  			    const struct flowi *fl,
-@@ -2426,6 +2462,7 @@ static int __mkroute_output(struct rtabl
+@@ -2424,6 +2462,7 @@ static int __mkroute_output(struct rtabl
  	rth->fl.fl4_tos	= tos;
  	rth->fl.fl4_src	= oldflp->fl4_src;
  	rth->fl.oif	= oldflp->oif;
@@ -1275,7 +1269,7 @@
  	rth->fl.mark    = oldflp->mark;
  	rth->rt_dst	= fl->fl4_dst;
  	rth->rt_src	= fl->fl4_src;
-@@ -2508,6 +2545,7 @@ static int ip_route_output_slow(struct n
+@@ -2506,6 +2545,7 @@ static int ip_route_output_slow(struct n
  	struct flowi fl = { .nl_u = { .ip4_u =
  				      { .daddr = oldflp->fl4_dst,
  					.saddr = oldflp->fl4_src,
@@ -1283,7 +1277,7 @@
  					.tos = tos & IPTOS_RT_MASK,
  					.scope = ((tos & RTO_ONLINK) ?
  						  RT_SCOPE_LINK :
-@@ -2619,6 +2657,7 @@ static int ip_route_output_slow(struct n
+@@ -2617,6 +2657,7 @@ static int ip_route_output_slow(struct n
  		dev_out = net->loopback_dev;
  		dev_hold(dev_out);
  		fl.oif = net->loopback_dev->ifindex;
@@ -1291,7 +1285,7 @@
  		res.type = RTN_LOCAL;
  		flags |= RTCF_LOCAL;
  		goto make_route;
-@@ -2626,7 +2665,7 @@ static int ip_route_output_slow(struct n
+@@ -2624,7 +2665,7 @@ static int ip_route_output_slow(struct n
  
  	if (fib_lookup(net, &fl, &res)) {
  		res.fi = NULL;
@@ -1300,7 +1294,7 @@
  			/* Apparently, routing tables are wrong. Assume,
  			   that the destination is on link.
  
-@@ -2666,6 +2705,7 @@ static int ip_route_output_slow(struct n
+@@ -2664,6 +2705,7 @@ static int ip_route_output_slow(struct n
  		dev_out = net->loopback_dev;
  		dev_hold(dev_out);
  		fl.oif = dev_out->ifindex;
@@ -1308,7 +1302,7 @@
  		if (res.fi)
  			fib_info_put(res.fi);
  		res.fi = NULL;
-@@ -2673,13 +2713,12 @@ static int ip_route_output_slow(struct n
+@@ -2671,13 +2713,12 @@ static int ip_route_output_slow(struct n
  		goto make_route;
  	}
  
@@ -1325,7 +1319,7 @@
  
  	if (!fl.fl4_src)
  		fl.fl4_src = FIB_RES_PREFSRC(res);
-@@ -2720,6 +2759,7 @@ int __ip_route_output_key(struct net *ne
+@@ -2718,6 +2759,7 @@ int __ip_route_output_key(struct net *ne
  		    rth->fl.fl4_src == flp->fl4_src &&
  		    rth->fl.iif == 0 &&
  		    rth->fl.oif == flp->oif &&
@@ -1333,8 +1327,3 @@
  		    rth->fl.mark == flp->mark &&
  		    !((rth->fl.fl4_tos ^ flp->fl4_tos) &
  			    (IPTOS_RT_MASK | RTO_ONLINK)) &&
-@@ -3368,3 +3408,4 @@ void __init ip_static_sysctl_init(void)
- 
- EXPORT_SYMBOL(__ip_select_ident);
- EXPORT_SYMBOL(ip_route_output_key);
-+EXPORT_SYMBOL(ip_route_input_lookup);

================================================================
Index: packages/kernel/kernel.spec
diff -u packages/kernel/kernel.spec:1.850 packages/kernel/kernel.spec:1.851
--- packages/kernel/kernel.spec:1.850	Sat Oct 23 15:23:48 2010
+++ packages/kernel/kernel.spec	Sat Oct 23 15:55:45 2010
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-routes.patch?r1=1.10&r2=1.11&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.850&r2=1.851&f=u



More information about the pld-cvs-commit mailing list