SOURCES (LINUX_2_6): kernel-routes.patch - up for 2.6.29

arekm arekm at pld-linux.org
Tue Mar 24 13:33:22 CET 2009


Author: arekm                        Date: Tue Mar 24 12:33:22 2009 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- up for 2.6.29

---- Files affected:
SOURCES:
   kernel-routes.patch (1.1.2.4 -> 1.1.2.5) 

---- Diffs:

================================================================
Index: SOURCES/kernel-routes.patch
diff -u SOURCES/kernel-routes.patch:1.1.2.4 SOURCES/kernel-routes.patch:1.1.2.5
--- SOURCES/kernel-routes.patch:1.1.2.4	Thu Dec 25 21:48:57 2008
+++ SOURCES/kernel-routes.patch	Tue Mar 24 13:33:16 2009
@@ -1,6 +1,6 @@
-diff -urp v2.6.27/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h
---- v2.6.27/linux/include/linux/rtnetlink.h	2008-10-11 12:46:15.000000000 +0300
-+++ linux/include/linux/rtnetlink.h	2008-10-11 13:50:41.000000000 +0300
+diff -urp v2.6.28/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h
+--- v2.6.28/linux/include/linux/rtnetlink.h	2008-12-25 10:12:24.000000000 +0200
++++ linux/include/linux/rtnetlink.h	2009-02-06 09:43:23.000000000 +0200
 @@ -304,6 +304,8 @@ struct rtnexthop
  #define RTNH_F_DEAD		1	/* Nexthop is dead (used by multipath)	*/
  #define RTNH_F_PERVASIVE	2	/* Do recursive gateway lookup	*/
@@ -10,9 +10,9 @@
  
  /* Macros to handle hexthops */
  
-diff -urp v2.6.27/linux/include/net/flow.h linux/include/net/flow.h
---- v2.6.27/linux/include/net/flow.h	2008-10-11 12:46:15.000000000 +0300
-+++ linux/include/net/flow.h	2008-10-11 13:51:37.000000000 +0300
+diff -urp v2.6.28/linux/include/net/flow.h linux/include/net/flow.h
+--- v2.6.28/linux/include/net/flow.h	2008-12-25 10:12:24.000000000 +0200
++++ linux/include/net/flow.h	2009-02-06 09:43:23.000000000 +0200
 @@ -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.27/linux/include/net/ip_fib.h linux/include/net/ip_fib.h
---- v2.6.27/linux/include/net/ip_fib.h	2008-04-17 09:58:08.000000000 +0300
-+++ linux/include/net/ip_fib.h	2008-10-11 13:50:41.000000000 +0300
+diff -urp v2.6.28/linux/include/net/ip_fib.h linux/include/net/ip_fib.h
+--- v2.6.28/linux/include/net/ip_fib.h	2008-04-17 09:58:08.000000000 +0300
++++ linux/include/net/ip_fib.h	2009-02-06 09:43:23.000000000 +0200
 @@ -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.27/linux/include/net/netfilter/nf_nat.h linux/include/net/netfilter/nf_nat.h
---- v2.6.27/linux/include/net/netfilter/nf_nat.h	2008-04-17 09:58:08.000000000 +0300
-+++ linux/include/net/netfilter/nf_nat.h	2008-10-11 13:51:37.000000000 +0300
+diff -urp v2.6.28/linux/include/net/netfilter/nf_nat.h linux/include/net/netfilter/nf_nat.h
+--- v2.6.28/linux/include/net/netfilter/nf_nat.h	2008-04-17 09:58:08.000000000 +0300
++++ linux/include/net/netfilter/nf_nat.h	2009-02-06 09:43:23.000000000 +0200
 @@ -77,6 +77,13 @@ struct nf_conn_nat
  #endif
  };
@@ -67,9 +67,9 @@
  /* 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.27/linux/include/net/route.h linux/include/net/route.h
---- v2.6.27/linux/include/net/route.h	2008-10-11 12:46:15.000000000 +0300
-+++ linux/include/net/route.h	2008-10-11 13:51:37.000000000 +0300
+diff -urp v2.6.28/linux/include/net/route.h linux/include/net/route.h
+--- v2.6.28/linux/include/net/route.h	2008-12-25 10:12:24.000000000 +0200
++++ linux/include/net/route.h	2009-02-06 09:43:23.000000000 +0200
 @@ -116,6 +116,7 @@ extern int		__ip_route_output_key(struct
  extern int		ip_route_output_key(struct net *, struct rtable **, struct flowi *flp);
  extern int		ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);
@@ -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.27/linux/net/bridge/br_netfilter.c linux/net/bridge/br_netfilter.c
---- v2.6.27/linux/net/bridge/br_netfilter.c	2008-10-11 12:46:16.000000000 +0300
-+++ linux/net/bridge/br_netfilter.c	2008-10-11 13:51:37.000000000 +0300
-@@ -328,6 +328,10 @@ static int br_nf_pre_routing_finish(stru
+diff -urp v2.6.28/linux/net/bridge/br_netfilter.c linux/net/bridge/br_netfilter.c
+--- v2.6.28/linux/net/bridge/br_netfilter.c	2008-12-25 10:12:25.000000000 +0200
++++ linux/net/bridge/br_netfilter.c	2009-02-06 09:43:23.000000000 +0200
+@@ -341,6 +341,10 @@ static int br_nf_pre_routing_finish(stru
  	struct nf_bridge_info *nf_bridge = skb->nf_bridge;
  	int err;
  
@@ -92,9 +92,9 @@
  	if (nf_bridge->mask & BRNF_PKT_TYPE) {
  		skb->pkt_type = PACKET_OTHERHOST;
  		nf_bridge->mask ^= BRNF_PKT_TYPE;
-diff -urp v2.6.27/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c
---- v2.6.27/linux/net/ipv4/fib_frontend.c	2008-10-11 12:46:16.000000000 +0300
-+++ linux/net/ipv4/fib_frontend.c	2008-10-11 13:50:41.000000000 +0300
+diff -urp v2.6.28/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c
+--- v2.6.28/linux/net/ipv4/fib_frontend.c	2008-10-11 12:46:16.000000000 +0300
++++ linux/net/ipv4/fib_frontend.c	2009-02-06 09:43:23.000000000 +0200
 @@ -47,6 +47,8 @@
  
  #ifndef CONFIG_IP_MULTIPLE_TABLES
@@ -196,9 +196,9 @@
  		rt_cache_flush(dev_net(dev), -1);
  		break;
  	case NETDEV_DOWN:
-diff -urp v2.6.27/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c
---- v2.6.27/linux/net/ipv4/fib_hash.c	2008-10-11 12:46:16.000000000 +0300
-+++ linux/net/ipv4/fib_hash.c	2008-10-11 13:50:41.000000000 +0300
+diff -urp v2.6.28/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c
+--- v2.6.28/linux/net/ipv4/fib_hash.c	2008-10-11 12:46:16.000000000 +0300
++++ linux/net/ipv4/fib_hash.c	2009-02-06 09:43:23.000000000 +0200
 @@ -278,25 +278,35 @@ out:
  static void
  fn_hash_select_default(struct fib_table *tb, const struct flowi *flp, struct fib_result *res)
@@ -211,7 +211,7 @@
  	struct fib_node *f;
  	struct fib_info *fi = NULL;
  	struct fib_info *last_resort;
- 	struct fn_hash *t = (struct fn_hash*)tb->tb_data;
+ 	struct fn_hash *t = (struct fn_hash *)tb->tb_data;
 -	struct fn_zone *fz = t->fn_zones[0];
 +	struct fn_zone *fz = t->fn_zones[res->prefixlen];
 +	__be32 k;
@@ -325,9 +325,9 @@
  
  	/*
  	 * Insert new entry to the list.
-diff -urp v2.6.27/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h
---- v2.6.27/linux/net/ipv4/fib_lookup.h	2008-04-17 09:58:09.000000000 +0300
-+++ linux/net/ipv4/fib_lookup.h	2008-10-11 13:50:41.000000000 +0300
+diff -urp v2.6.28/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h
+--- v2.6.28/linux/net/ipv4/fib_lookup.h	2008-04-17 09:58:09.000000000 +0300
++++ linux/net/ipv4/fib_lookup.h	2009-02-06 09:43:23.000000000 +0200
 @@ -8,6 +8,7 @@
  struct fib_alias {
  	struct list_head	fa_list;
@@ -346,9 +346,9 @@
  
  static inline void fib_result_assign(struct fib_result *res,
  				     struct fib_info *fi)
-diff -urp v2.6.27/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c
---- v2.6.27/linux/net/ipv4/fib_rules.c	2008-10-11 12:46:16.000000000 +0300
-+++ linux/net/ipv4/fib_rules.c	2008-10-11 13:50:41.000000000 +0300
+diff -urp v2.6.28/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c
+--- v2.6.28/linux/net/ipv4/fib_rules.c	2008-10-11 12:46:16.000000000 +0300
++++ linux/net/ipv4/fib_rules.c	2009-02-06 09:43:23.000000000 +0200
 @@ -54,6 +54,11 @@ u32 fib_rules_tclass(struct fib_result *
  }
  #endif
@@ -361,9 +361,9 @@
  int fib_lookup(struct net *net, struct flowi *flp, struct fib_result *res)
  {
  	struct fib_lookup_arg arg = {
-diff -urp v2.6.27/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c
---- v2.6.27/linux/net/ipv4/fib_semantics.c	2008-10-11 12:46:16.000000000 +0300
-+++ linux/net/ipv4/fib_semantics.c	2008-10-11 13:51:37.000000000 +0300
+diff -urp v2.6.28/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c
+--- v2.6.28/linux/net/ipv4/fib_semantics.c	2008-10-11 12:46:16.000000000 +0300
++++ linux/net/ipv4/fib_semantics.c	2009-02-06 09:43:23.000000000 +0200
 @@ -50,6 +50,7 @@ static struct hlist_head *fib_info_hash;
  static struct hlist_head *fib_info_laddrhash;
  static unsigned int fib_hash_size;
@@ -421,7 +421,7 @@
 -		state = n->nud_state;
 -		neigh_release(n);
 -	}
--	if (state==NUD_REACHABLE)
+-	if (state == NUD_REACHABLE)
 -		return 0;
 -	if ((state&NUD_VALID) && order != dflt)
 -		return 0;
@@ -445,7 +445,7 @@
 +			state = n->nud_state;
 +			neigh_release(n);
 +		}
-+		if (state==NUD_REACHABLE ||
++		if (state == NUD_REACHABLE ||
 +			((state&NUD_VALID) && order != *dflt)) {
 +			dead = 0;
 +			goto setfl;
@@ -812,9 +812,9 @@
  	spin_unlock_bh(&fib_multipath_lock);
  }
  #endif
-diff -urp v2.6.27/linux/net/ipv4/fib_trie.c linux/net/ipv4/fib_trie.c
---- v2.6.27/linux/net/ipv4/fib_trie.c	2008-10-11 12:46:16.000000000 +0300
-+++ linux/net/ipv4/fib_trie.c	2008-10-11 13:50:41.000000000 +0300
+diff -urp v2.6.28/linux/net/ipv4/fib_trie.c linux/net/ipv4/fib_trie.c
+--- v2.6.28/linux/net/ipv4/fib_trie.c	2008-10-11 12:46:16.000000000 +0300
++++ linux/net/ipv4/fib_trie.c	2009-02-06 09:43:23.000000000 +0200
 @@ -1261,6 +1261,7 @@ static int fn_trie_insert(struct fib_tab
  			fi_drop = fa->fa_info;
  			new_fa->fa_tos = fa->fa_tos;
@@ -933,10 +933,10 @@
  out:
  	rcu_read_unlock();
  }
-diff -urp v2.6.27/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfilter/ipt_MASQUERADE.c
---- v2.6.27/linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2008-10-11 12:46:16.000000000 +0300
-+++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2008-10-11 13:51:37.000000000 +0300
-@@ -59,7 +59,7 @@ masquerade_tg(struct sk_buff *skb, const
+diff -urp v2.6.28/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfilter/ipt_MASQUERADE.c
+--- v2.6.28/linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2008-12-25 10:12:25.000000000 +0200
++++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2009-02-06 09:43:23.000000000 +0200
+@@ -54,7 +54,7 @@ masquerade_tg(struct sk_buff *skb, const
  	enum ip_conntrack_info ctinfo;
  	struct nf_nat_range newrange;
  	const struct nf_nat_multi_range_compat *mr;
@@ -944,8 +944,8 @@
 +	struct rtable *rt;
  	__be32 newsrc;
  
- 	NF_CT_ASSERT(hooknum == NF_INET_POST_ROUTING);
-@@ -77,13 +77,28 @@ masquerade_tg(struct sk_buff *skb, const
+ 	NF_CT_ASSERT(par->hooknum == NF_INET_POST_ROUTING);
+@@ -72,13 +72,28 @@ masquerade_tg(struct sk_buff *skb, const
  		return NF_ACCEPT;
  
  	mr = par->targinfo;
@@ -977,13 +977,13 @@
 +	ip_rt_put(rt);
 +
  	write_lock_bh(&masq_lock);
- 	nat->masq_index = out->ifindex;
+ 	nat->masq_index = par->out->ifindex;
  	write_unlock_bh(&masq_lock);
-diff -urp v2.6.27/linux/net/ipv4/netfilter/nf_nat_core.c linux/net/ipv4/netfilter/nf_nat_core.c
---- v2.6.27/linux/net/ipv4/netfilter/nf_nat_core.c	2008-10-11 12:46:16.000000000 +0300
-+++ linux/net/ipv4/netfilter/nf_nat_core.c	2008-10-11 13:51:37.000000000 +0300
-@@ -583,6 +583,52 @@ static struct nf_ct_ext_type nat_extend 
- 	.flags		= NF_CT_EXT_F_PREALLOC,
+diff -urp v2.6.28/linux/net/ipv4/netfilter/nf_nat_core.c linux/net/ipv4/netfilter/nf_nat_core.c
+--- v2.6.28/linux/net/ipv4/netfilter/nf_nat_core.c	2008-12-25 10:12:25.000000000 +0200
++++ linux/net/ipv4/netfilter/nf_nat_core.c	2009-02-06 09:43:23.000000000 +0200
+@@ -710,6 +710,52 @@ static struct pernet_operations nf_nat_n
+ 	.exit = nf_nat_net_exit,
  };
  
 +unsigned int
@@ -1035,9 +1035,9 @@
  static int __init nf_nat_init(void)
  {
  	size_t i;
-diff -urp v2.6.27/linux/net/ipv4/netfilter/nf_nat_standalone.c linux/net/ipv4/netfilter/nf_nat_standalone.c
---- v2.6.27/linux/net/ipv4/netfilter/nf_nat_standalone.c	2008-07-14 09:58:50.000000000 +0300
-+++ linux/net/ipv4/netfilter/nf_nat_standalone.c	2008-10-11 13:51:37.000000000 +0300
+diff -urp v2.6.28/linux/net/ipv4/netfilter/nf_nat_standalone.c linux/net/ipv4/netfilter/nf_nat_standalone.c
+--- v2.6.28/linux/net/ipv4/netfilter/nf_nat_standalone.c	2008-07-14 09:58:50.000000000 +0300
++++ linux/net/ipv4/netfilter/nf_nat_standalone.c	2009-02-06 09:43:23.000000000 +0200
 @@ -256,6 +256,14 @@ static struct nf_hook_ops nf_nat_ops[] _
  		.hooknum	= NF_INET_PRE_ROUTING,
  		.priority	= NF_IP_PRI_NAT_DST,
@@ -1053,10 +1053,18 @@
  	/* After packet filtering, change source */
  	{
  		.hook		= nf_nat_out,
-diff -urp v2.6.27/linux/net/ipv4/route.c linux/net/ipv4/route.c
---- v2.6.27/linux/net/ipv4/route.c	2008-10-11 12:46:16.000000000 +0300
-+++ linux/net/ipv4/route.c	2008-10-11 13:51:37.000000000 +0300
-@@ -1276,6 +1276,7 @@ void ip_rt_redirect(__be32 old_gw, __be3
+diff -urp v2.6.28/linux/net/ipv4/route.c linux/net/ipv4/route.c
+--- v2.6.28/linux/net/ipv4/route.c	2008-12-25 10:12:25.000000000 +0200
++++ linux/net/ipv4/route.c	2009-02-06 09:43:43.000000000 +0200
+@@ -679,6 +679,7 @@ static inline int compare_keys(struct fl
+ 	return ((__force u32)((fl1->nl_u.ip4_u.daddr ^ fl2->nl_u.ip4_u.daddr) |
+ 		(fl1->nl_u.ip4_u.saddr ^ fl2->nl_u.ip4_u.saddr)) |
+ 		(fl1->mark ^ fl2->mark) |
++		((__force u32)(fl1->nl_u.ip4_u.lsrc ^ fl2->nl_u.ip4_u.lsrc)) |
+ 		(*(u16 *)&fl1->nl_u.ip4_u.tos ^
+ 		 *(u16 *)&fl2->nl_u.ip4_u.tos) |
+ 		(fl1->oif ^ fl2->oif) |
+@@ -1286,6 +1287,7 @@ void ip_rt_redirect(__be32 old_gw, __be3
  
  				/* Gateway is different ... */
  				rt->rt_gateway		= new_gw;
@@ -1064,7 +1072,7 @@
  
  				/* Redirect received -> path was valid */
  				dst_confirm(&rth->u.dst);
-@@ -1725,6 +1726,7 @@ static int ip_route_input_mc(struct sk_b
+@@ -1735,6 +1737,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;
@@ -1072,7 +1080,7 @@
  	rth->rt_src	= saddr;
  #ifdef CONFIG_NET_CLS_ROUTE
  	rth->u.dst.tclassid = itag;
-@@ -1735,6 +1737,7 @@ static int ip_route_input_mc(struct sk_b
+@@ -1745,6 +1748,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;
@@ -1080,7 +1088,7 @@
  	rth->rt_gateway	= daddr;
  	rth->rt_spec_dst= spec_dst;
  	rth->rt_genid	= rt_genid(dev_net(dev));
-@@ -1800,7 +1803,7 @@ static int __mkroute_input(struct sk_buf
+@@ -1810,7 +1814,7 @@ static int __mkroute_input(struct sk_buf
  			   struct fib_result *res,
  			   struct in_device *in_dev,
  			   __be32 daddr, __be32 saddr, u32 tos,
@@ -1089,7 +1097,7 @@
  {
  
  	struct rtable *rth;
-@@ -1834,6 +1837,7 @@ static int __mkroute_input(struct sk_buf
+@@ -1844,6 +1848,7 @@ static int __mkroute_input(struct sk_buf
  		flags |= RTCF_DIRECTSRC;
  
  	if (out_dev == in_dev && err &&
@@ -1097,7 +1105,7 @@
  	    (IN_DEV_SHARED_MEDIA(out_dev) ||
  	     inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
  		flags |= RTCF_DOREDIRECT;
-@@ -1867,6 +1871,7 @@ static int __mkroute_input(struct sk_buf
+@@ -1877,6 +1882,7 @@ static int __mkroute_input(struct sk_buf
  	rth->fl.mark    = skb->mark;
  	rth->fl.fl4_src	= saddr;
  	rth->rt_src	= saddr;
@@ -1105,7 +1113,7 @@
  	rth->rt_gateway	= daddr;
  	rth->rt_iif 	=
  		rth->fl.iif	= in_dev->dev->ifindex;
-@@ -1874,6 +1879,7 @@ static int __mkroute_input(struct sk_buf
+@@ -1884,6 +1890,7 @@ static int __mkroute_input(struct sk_buf
  	dev_hold(rth->u.dst.dev);
  	rth->idev	= in_dev_get(rth->u.dst.dev);
  	rth->fl.oif 	= 0;
@@ -1113,7 +1121,7 @@
  	rth->rt_spec_dst= spec_dst;
  
  	rth->u.dst.input = ip_forward;
-@@ -1894,21 +1900,23 @@ static int __mkroute_input(struct sk_buf
+@@ -1904,21 +1911,23 @@ static int __mkroute_input(struct sk_buf
  
  static int ip_mkroute_input(struct sk_buff *skb,
  			    struct fib_result *res,
@@ -1140,7 +1148,7 @@
  	if (err)
  		return err;
  
-@@ -1929,18 +1937,19 @@ static int ip_mkroute_input(struct sk_bu
+@@ -1939,18 +1948,19 @@ static int ip_mkroute_input(struct sk_bu
   */
  
  static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
@@ -1163,7 +1171,7 @@
  	unsigned	flags = 0;
  	u32		itag = 0;
  	struct rtable * rth;
-@@ -1976,6 +1985,12 @@ static int ip_route_input_slow(struct sk
+@@ -1986,6 +1996,12 @@ static int ip_route_input_slow(struct sk
  	    ipv4_is_loopback(daddr))
  		goto martian_destination;
  
@@ -1176,7 +1184,7 @@
  	/*
  	 *	Now we are ready to route packet.
  	 */
-@@ -1985,6 +2000,8 @@ static int ip_route_input_slow(struct sk
+@@ -1995,6 +2011,8 @@ static int ip_route_input_slow(struct sk
  		goto no_route;
  	}
  	free_res = 1;
@@ -1185,7 +1193,7 @@
  
  	RT_CACHE_STAT_INC(in_slow_tot);
  
-@@ -2009,7 +2026,7 @@ static int ip_route_input_slow(struct sk
+@@ -2019,7 +2037,7 @@ static int ip_route_input_slow(struct sk
  	if (res.type != RTN_UNICAST)
  		goto martian_destination;
  
@@ -1194,7 +1202,7 @@
  done:
  	in_dev_put(in_dev);
  	if (free_res)
-@@ -2019,6 +2036,8 @@ out:	return err;
+@@ -2029,6 +2047,8 @@ out:	return err;
  brd_input:
  	if (skb->protocol != htons(ETH_P_IP))
  		goto e_inval;
@@ -1203,7 +1211,7 @@
  
  	if (ipv4_is_zeronet(saddr))
  		spec_dst = inet_select_addr(dev, 0, RT_SCOPE_LINK);
-@@ -2060,6 +2079,7 @@ local_input:
+@@ -2070,6 +2090,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);
@@ -1211,7 +1219,7 @@
  	rth->rt_gateway	= daddr;
  	rth->rt_spec_dst= spec_dst;
  	rth->u.dst.input= ip_local_deliver;
-@@ -2111,8 +2131,9 @@ martian_source:
+@@ -2121,8 +2142,9 @@ martian_source:
  	goto e_inval;
  }
  
@@ -1223,7 +1231,7 @@
  {
  	struct rtable * rth;
  	unsigned	hash;
-@@ -2129,6 +2150,7 @@ int ip_route_input(struct sk_buff *skb, 
+@@ -2139,6 +2161,7 @@ int ip_route_input(struct sk_buff *skb, 
  		if (((rth->fl.fl4_dst ^ daddr) |
  		     (rth->fl.fl4_src ^ saddr) |
  		     (rth->fl.iif ^ iif) |
@@ -1231,7 +1239,7 @@
  		     rth->fl.oif |
  		     (rth->fl.fl4_tos ^ tos)) == 0 &&
  		    rth->fl.mark == skb->mark &&
-@@ -2176,7 +2198,19 @@ int ip_route_input(struct sk_buff *skb, 
+@@ -2186,7 +2209,19 @@ int ip_route_input(struct sk_buff *skb, 
  		rcu_read_unlock();
  		return -EINVAL;
  	}
@@ -1252,7 +1260,7 @@
  }
  
  static int __mkroute_output(struct rtable **result,
-@@ -2248,6 +2282,7 @@ static int __mkroute_output(struct rtabl
+@@ -2258,6 +2293,7 @@ static int __mkroute_output(struct rtabl
  	rth->fl.fl4_tos	= tos;
  	rth->fl.fl4_src	= oldflp->fl4_src;
  	rth->fl.oif	= oldflp->oif;
@@ -1260,7 +1268,7 @@
  	rth->fl.mark    = oldflp->mark;
  	rth->rt_dst	= fl->fl4_dst;
  	rth->rt_src	= fl->fl4_src;
-@@ -2329,6 +2364,7 @@ static int ip_route_output_slow(struct n
+@@ -2339,6 +2375,7 @@ static int ip_route_output_slow(struct n
  	struct flowi fl = { .nl_u = { .ip4_u =
  				      { .daddr = oldflp->fl4_dst,
  					.saddr = oldflp->fl4_src,
@@ -1268,7 +1276,7 @@
  					.tos = tos & IPTOS_RT_MASK,
  					.scope = ((tos & RTO_ONLINK) ?
  						  RT_SCOPE_LINK :
-@@ -2434,6 +2470,7 @@ static int ip_route_output_slow(struct n
+@@ -2450,6 +2487,7 @@ static int ip_route_output_slow(struct n
  		dev_out = net->loopback_dev;
  		dev_hold(dev_out);
  		fl.oif = net->loopback_dev->ifindex;
@@ -1276,7 +1284,7 @@
  		res.type = RTN_LOCAL;
  		flags |= RTCF_LOCAL;
  		goto make_route;
-@@ -2441,7 +2478,7 @@ static int ip_route_output_slow(struct n
+@@ -2457,7 +2495,7 @@ static int ip_route_output_slow(struct n
  
  	if (fib_lookup(net, &fl, &res)) {
  		res.fi = NULL;
@@ -1285,7 +1293,7 @@
  			/* Apparently, routing tables are wrong. Assume,
  			   that the destination is on link.
  
-@@ -2481,6 +2518,7 @@ static int ip_route_output_slow(struct n
+@@ -2497,6 +2535,7 @@ static int ip_route_output_slow(struct n
  		dev_out = net->loopback_dev;
  		dev_hold(dev_out);
  		fl.oif = dev_out->ifindex;
@@ -1293,7 +1301,7 @@
  		if (res.fi)
  			fib_info_put(res.fi);
  		res.fi = NULL;
-@@ -2488,13 +2526,12 @@ static int ip_route_output_slow(struct n
+@@ -2504,13 +2543,12 @@ static int ip_route_output_slow(struct n
  		goto make_route;
  	}
  
@@ -1310,7 +1318,7 @@
  
  	if (!fl.fl4_src)
  		fl.fl4_src = FIB_RES_PREFSRC(res);
-@@ -2532,6 +2569,7 @@ int __ip_route_output_key(struct net *ne
+@@ -2548,6 +2586,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 &&
@@ -1318,7 +1326,7 @@
  		    rth->fl.mark == flp->mark &&
  		    !((rth->fl.fl4_tos ^ flp->fl4_tos) &
  			    (IPTOS_RT_MASK | RTO_ONLINK)) &&
-@@ -3310,3 +3348,4 @@ void __init ip_static_sysctl_init(void)
+@@ -3322,3 +3361,4 @@ void __init ip_static_sysctl_init(void)
  EXPORT_SYMBOL(__ip_select_ident);
  EXPORT_SYMBOL(ip_route_input);
  EXPORT_SYMBOL(ip_route_output_key);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-routes.patch?r1=1.1.2.4&r2=1.1.2.5&f=u



More information about the pld-cvs-commit mailing list