packages: kernel/kernel.spec, kernel/kernel-routes.patch - up to 38 version

arekm arekm at pld-linux.org
Mon Mar 21 20:04:03 CET 2011


Author: arekm                        Date: Mon Mar 21 19:04:03 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 38 version

---- Files affected:
packages/kernel:
   kernel.spec (1.893 -> 1.894) , kernel-routes.patch (1.12 -> 1.13) 

---- Diffs:

================================================================
Index: packages/kernel/kernel.spec
diff -u packages/kernel/kernel.spec:1.893 packages/kernel/kernel.spec:1.894
--- packages/kernel/kernel.spec:1.893	Thu Mar 17 09:27:18 2011
+++ packages/kernel/kernel.spec	Mon Mar 21 20:03:57 2011
@@ -266,7 +266,7 @@
 # alternative routes, the reverse path protection (rp_filter),
 # the NAT processing to use correctly the routing when multiple
 # gateways are used.
-# http://www.ssi.bg/~ja/routes-2.6.37-16.diff
+# http://www.ssi.bg/~ja/routes-2.6.38-16.diff
 Patch300:	kernel-routes.patch
 
 # https://patchwork.kernel.org/patch/236261/
@@ -1525,6 +1525,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.894  2011/03/21 19:03:57  arekm
+- up to 38 version
+
 Revision 1.893  2011/03/17 08:27:18  arekm
 - unofficial tuxonice
 

================================================================
Index: packages/kernel/kernel-routes.patch
diff -u packages/kernel/kernel-routes.patch:1.12 packages/kernel/kernel-routes.patch:1.13
--- packages/kernel/kernel-routes.patch:1.12	Sat Jan  8 19:14:58 2011
+++ packages/kernel/kernel-routes.patch	Mon Mar 21 20:03:58 2011
@@ -1,6 +1,6 @@
-diff -urp v2.6.37/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h
---- v2.6.37/linux/include/linux/rtnetlink.h	2011-01-06 00:01:18.000000000 +0200
-+++ linux/include/linux/rtnetlink.h	2011-01-08 17:20:30.066270851 +0200
+diff -urp v2.6.38/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h
+--- v2.6.38/linux/include/linux/rtnetlink.h	2011-03-20 12:05:41.000000000 +0200
++++ linux/include/linux/rtnetlink.h	2011-03-20 12:12:11.107248055 +0200
 @@ -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	*/
@@ -10,9 +10,9 @@
  
  /* Macros to handle hexthops */
  
-diff -urp v2.6.37/linux/include/net/flow.h linux/include/net/flow.h
---- v2.6.37/linux/include/net/flow.h	2010-08-02 09:37:48.000000000 +0300
-+++ linux/include/net/flow.h	2011-01-08 17:21:40.092271753 +0200
+diff -urp v2.6.38/linux/include/net/flow.h linux/include/net/flow.h
+--- v2.6.38/linux/include/net/flow.h	2011-03-20 12:01:11.000000000 +0200
++++ linux/include/net/flow.h	2011-03-20 12:13:20.139247270 +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.37/linux/include/net/ip_fib.h linux/include/net/ip_fib.h
---- v2.6.37/linux/include/net/ip_fib.h	2011-01-06 00:01:19.000000000 +0200
-+++ linux/include/net/ip_fib.h	2011-01-08 17:20:30.066270851 +0200
+diff -urp v2.6.38/linux/include/net/ip_fib.h linux/include/net/ip_fib.h
+--- v2.6.38/linux/include/net/ip_fib.h	2011-03-20 12:05:50.000000000 +0200
++++ linux/include/net/ip_fib.h	2011-03-20 12:12:11.107248055 +0200
 @@ -210,6 +210,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.37/linux/include/net/netfilter/nf_nat.h linux/include/net/netfilter/nf_nat.h
---- v2.6.37/linux/include/net/netfilter/nf_nat.h	2010-02-25 09:01:36.000000000 +0200
-+++ linux/include/net/netfilter/nf_nat.h	2011-01-08 17:21:40.092271753 +0200
+diff -urp v2.6.38/linux/include/net/netfilter/nf_nat.h linux/include/net/netfilter/nf_nat.h
+--- v2.6.38/linux/include/net/netfilter/nf_nat.h	2011-03-20 12:01:11.000000000 +0200
++++ linux/include/net/netfilter/nf_nat.h	2011-03-20 12:13:20.140246808 +0200
 @@ -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.37/linux/include/net/route.h linux/include/net/route.h
---- v2.6.37/linux/include/net/route.h	2010-10-22 11:34:37.000000000 +0300
-+++ linux/include/net/route.h	2011-01-08 17:21:40.093271136 +0200
-@@ -126,6 +126,7 @@ static inline int ip_route_input_noref(s
+diff -urp v2.6.38/linux/include/net/route.h linux/include/net/route.h
+--- v2.6.38/linux/include/net/route.h	2011-03-20 12:01:11.000000000 +0200
++++ linux/include/net/route.h	2011-03-20 12:13:20.141248044 +0200
+@@ -134,6 +134,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.37/linux/net/bridge/br_netfilter.c linux/net/bridge/br_netfilter.c
---- v2.6.37/linux/net/bridge/br_netfilter.c	2011-01-06 00:01:21.000000000 +0200
-+++ linux/net/bridge/br_netfilter.c	2011-01-08 17:21:40.094271883 +0200
-@@ -404,6 +404,9 @@ static int br_nf_pre_routing_finish(stru
+diff -urp v2.6.38/linux/net/bridge/br_netfilter.c linux/net/bridge/br_netfilter.c
+--- v2.6.38/linux/net/bridge/br_netfilter.c	2011-03-20 12:01:11.000000000 +0200
++++ linux/net/bridge/br_netfilter.c	2011-03-20 12:13:20.142247890 +0200
+@@ -405,6 +405,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.37/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c
---- v2.6.37/linux/net/ipv4/fib_frontend.c	2011-01-06 00:01:22.000000000 +0200
-+++ linux/net/ipv4/fib_frontend.c	2011-01-08 17:20:30.067270952 +0200
+diff -urp v2.6.38/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c
+--- v2.6.38/linux/net/ipv4/fib_frontend.c	2011-03-20 12:05:50.000000000 +0200
++++ linux/net/ipv4/fib_frontend.c	2011-03-20 12:12:11.109247911 +0200
 @@ -47,6 +47,8 @@
  
  #ifndef CONFIG_IP_MULTIPLE_TABLES
@@ -122,7 +122,7 @@
  		fib_table_select_default(tb, flp, res);
  }
  
-@@ -264,6 +269,9 @@ int fib_validate_source(__be32 src, __be
+@@ -256,6 +261,9 @@ int fib_validate_source(__be32 src, __be
  		.iif = oif
  	};
  	struct fib_result res;
@@ -132,7 +132,7 @@
  	int no_addr, rpf, accept_local;
  	bool dev_match;
  	int ret;
-@@ -310,19 +318,26 @@ int fib_validate_source(__be32 src, __be
+@@ -302,19 +310,26 @@ int fib_validate_source(__be32 src, __be
  		ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST;
  		return ret;
  	}
@@ -162,7 +162,7 @@
  	return ret;
  
  last_resort:
-@@ -954,9 +969,7 @@ static int fib_inetaddr_event(struct not
+@@ -942,9 +957,7 @@ static int fib_inetaddr_event(struct not
  	switch (event) {
  	case NETDEV_UP:
  		fib_add_ifaddr(ifa);
@@ -172,7 +172,7 @@
  		rt_cache_flush(dev_net(dev), -1);
  		break;
  	case NETDEV_DOWN:
-@@ -992,9 +1005,7 @@ static int fib_netdev_event(struct notif
+@@ -980,9 +993,7 @@ static int fib_netdev_event(struct notif
  		for_ifa(in_dev) {
  			fib_add_ifaddr(ifa);
  		} endfor_ifa(in_dev);
@@ -182,9 +182,9 @@
  		rt_cache_flush(dev_net(dev), -1);
  		break;
  	case NETDEV_DOWN:
-diff -urp v2.6.37/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c
---- v2.6.37/linux/net/ipv4/fib_hash.c	2011-01-06 00:01:22.000000000 +0200
-+++ linux/net/ipv4/fib_hash.c	2011-01-08 17:20:30.068270994 +0200
+diff -urp v2.6.38/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c
+--- v2.6.38/linux/net/ipv4/fib_hash.c	2011-03-20 12:05:41.000000000 +0200
++++ linux/net/ipv4/fib_hash.c	2011-03-20 12:12:11.110247911 +0200
 @@ -305,27 +305,43 @@ out:
  void fib_table_select_default(struct fib_table *tb,
  			      const struct flowi *flp, struct fib_result *res)
@@ -333,9 +333,9 @@
  
  	/*
  	 * Insert new entry to the list.
-diff -urp v2.6.37/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h
---- v2.6.37/linux/net/ipv4/fib_lookup.h	2011-01-06 00:01:22.000000000 +0200
-+++ linux/net/ipv4/fib_lookup.h	2011-01-08 17:20:30.069271071 +0200
+diff -urp v2.6.38/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h
+--- v2.6.38/linux/net/ipv4/fib_lookup.h	2011-03-20 12:05:41.000000000 +0200
++++ linux/net/ipv4/fib_lookup.h	2011-03-20 12:12:11.111246945 +0200
 @@ -8,6 +8,7 @@
  struct fib_alias {
  	struct list_head	fa_list;
@@ -354,9 +354,9 @@
  
  static inline void fib_result_assign(struct fib_result *res,
  				     struct fib_info *fi)
-diff -urp v2.6.37/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c
---- v2.6.37/linux/net/ipv4/fib_rules.c	2011-01-06 00:01:22.000000000 +0200
-+++ linux/net/ipv4/fib_rules.c	2011-01-08 17:20:30.070271447 +0200
+diff -urp v2.6.38/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c
+--- v2.6.38/linux/net/ipv4/fib_rules.c	2011-03-20 12:05:41.000000000 +0200
++++ linux/net/ipv4/fib_rules.c	2011-03-20 12:12:11.111246945 +0200
 @@ -53,6 +53,11 @@ u32 fib_rules_tclass(struct fib_result *
  }
  #endif
@@ -369,9 +369,9 @@
  int fib_lookup(struct net *net, struct flowi *flp, struct fib_result *res)
  {
  	struct fib_lookup_arg arg = {
-diff -urp v2.6.37/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c
---- v2.6.37/linux/net/ipv4/fib_semantics.c	2011-01-06 00:01:22.000000000 +0200
-+++ linux/net/ipv4/fib_semantics.c	2011-01-08 17:21:40.095271450 +0200
+diff -urp v2.6.38/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c
+--- v2.6.38/linux/net/ipv4/fib_semantics.c	2011-03-20 12:05:50.000000000 +0200
++++ linux/net/ipv4/fib_semantics.c	2011-03-20 12:13:20.143248500 +0200
 @@ -51,6 +51,7 @@ static struct hlist_head *fib_info_hash;
  static struct hlist_head *fib_info_laddrhash;
  static unsigned int fib_hash_size;
@@ -499,7 +499,7 @@
  			nh->nh_dev = dev;
  			dev_hold(dev);
  			nh->nh_scope = RT_SCOPE_LINK;
-@@ -576,21 +624,41 @@ static int fib_check_nh(struct fib_confi
+@@ -572,21 +620,41 @@ static int fib_check_nh(struct fib_confi
  			if (fl.fl4_scope < RT_SCOPE_LINK)
  				fl.fl4_scope = RT_SCOPE_LINK;
  			err = fib_lookup(net, &fl, &res);
@@ -554,7 +554,7 @@
  	} else {
  		struct in_device *in_dev;
  
-@@ -603,8 +671,11 @@ static int fib_check_nh(struct fib_confi
+@@ -599,8 +667,11 @@ static int fib_check_nh(struct fib_confi
  		if (in_dev == NULL)
  			goto out;
  		err = -ENETDOWN;
@@ -568,7 +568,7 @@
  		nh->nh_dev = in_dev->dev;
  		dev_hold(nh->nh_dev);
  		nh->nh_scope = RT_SCOPE_HOST;
-@@ -919,8 +990,12 @@ int fib_semantic_match(struct list_head 
+@@ -915,8 +986,12 @@ int fib_semantic_match(struct list_head 
  				for_nexthops(fi) {
  					if (nh->nh_flags & RTNH_F_DEAD)
  						continue;
@@ -583,7 +583,7 @@
  				}
  #ifdef CONFIG_IP_ROUTE_MULTIPATH
  				if (nhsel < fi->fib_nhs) {
-@@ -1100,18 +1175,29 @@ int fib_sync_down_dev(struct net_device 
+@@ -1096,18 +1171,29 @@ int fib_sync_down_dev(struct net_device 
  		prev_fi = fi;
  		dead = 0;
  		change_nexthops(fi) {
@@ -621,7 +621,7 @@
  			}
  #ifdef CONFIG_IP_ROUTE_MULTIPATH
  			if (force > 1 && nexthop_nh->nh_dev == dev) {
-@@ -1129,11 +1215,8 @@ int fib_sync_down_dev(struct net_device 
+@@ -1125,11 +1211,8 @@ int fib_sync_down_dev(struct net_device 
  	return ret;
  }
  
@@ -634,7 +634,7 @@
   */
  int fib_sync_up(struct net_device *dev)
  {
-@@ -1142,8 +1225,10 @@ int fib_sync_up(struct net_device *dev)
+@@ -1138,8 +1221,10 @@ int fib_sync_up(struct net_device *dev)
  	struct hlist_head *head;
  	struct hlist_node *node;
  	struct fib_nh *nh;
@@ -646,7 +646,7 @@
  	if (!(dev->flags & IFF_UP))
  		return 0;
  
-@@ -1151,6 +1236,7 @@ int fib_sync_up(struct net_device *dev)
+@@ -1147,6 +1232,7 @@ int fib_sync_up(struct net_device *dev)
  	hash = fib_devindex_hashfn(dev->ifindex);
  	head = &fib_info_devhash[hash];
  	ret = 0;
@@ -654,7 +654,7 @@
  
  	hlist_for_each_entry(nh, node, head, nh_hash) {
  		struct fib_info *fi = nh->nh_parent;
-@@ -1163,21 +1249,45 @@ int fib_sync_up(struct net_device *dev)
+@@ -1159,21 +1245,45 @@ int fib_sync_up(struct net_device *dev)
  		prev_fi = fi;
  		alive = 0;
  		change_nexthops(fi) {
@@ -703,7 +703,7 @@
  		} endfor_nexthops(fi)
  
  		if (alive > 0) {
-@@ -1185,10 +1295,14 @@ int fib_sync_up(struct net_device *dev)
+@@ -1181,10 +1291,14 @@ int fib_sync_up(struct net_device *dev)
  			ret++;
  		}
  	}
@@ -718,7 +718,7 @@
  /*
   * The algorithm is suboptimal, but it provides really
   * fair weighted route distribution.
-@@ -1196,24 +1310,46 @@ int fib_sync_up(struct net_device *dev)
+@@ -1192,24 +1306,46 @@ int fib_sync_up(struct net_device *dev)
  void fib_select_multipath(const struct flowi *flp, struct fib_result *res)
  {
  	struct fib_info *fi = res->fi;
@@ -773,7 +773,7 @@
  	}
  
  
-@@ -1223,8 +1359,9 @@ void fib_select_multipath(const struct f
+@@ -1219,8 +1355,9 @@ void fib_select_multipath(const struct f
  
  	w = jiffies % fi->fib_power;
  
@@ -784,7 +784,7 @@
  		    nexthop_nh->nh_power) {
  			w -= nexthop_nh->nh_power;
  			if (w <= 0) {
-@@ -1234,11 +1371,29 @@ void fib_select_multipath(const struct f
+@@ -1230,11 +1367,29 @@ void fib_select_multipath(const struct f
  				spin_unlock_bh(&fib_multipath_lock);
  				return;
  			}
@@ -815,9 +815,9 @@
  	spin_unlock_bh(&fib_multipath_lock);
  }
  #endif
-diff -urp v2.6.37/linux/net/ipv4/fib_trie.c linux/net/ipv4/fib_trie.c
---- v2.6.37/linux/net/ipv4/fib_trie.c	2011-01-06 00:01:22.000000000 +0200
-+++ linux/net/ipv4/fib_trie.c	2011-01-08 17:20:30.073271586 +0200
+diff -urp v2.6.38/linux/net/ipv4/fib_trie.c linux/net/ipv4/fib_trie.c
+--- v2.6.38/linux/net/ipv4/fib_trie.c	2011-03-20 12:05:41.000000000 +0200
++++ linux/net/ipv4/fib_trie.c	2011-03-20 12:12:11.115247884 +0200
 @@ -1270,6 +1270,7 @@ int fib_table_insert(struct fib_table *t
  			fi_drop = fa->fa_info;
  			new_fa->fa_tos = fa->fa_tos;
@@ -937,9 +937,9 @@
  out:
  	rcu_read_unlock();
  }
-diff -urp v2.6.37/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfilter/ipt_MASQUERADE.c
---- v2.6.37/linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2010-08-02 09:37:49.000000000 +0300
-+++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2011-01-08 17:21:40.096271293 +0200
+diff -urp v2.6.38/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfilter/ipt_MASQUERADE.c
+--- v2.6.38/linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2011-03-20 12:01:11.000000000 +0200
++++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2011-03-20 12:16:02.963248753 +0200
 @@ -51,7 +51,7 @@ masquerade_tg(struct sk_buff *skb, const
  	enum ip_conntrack_info ctinfo;
  	struct nf_nat_range newrange;
@@ -949,7 +949,7 @@
  	__be32 newsrc;
  
  	NF_CT_ASSERT(par->hooknum == NF_INET_POST_ROUTING);
-@@ -69,13 +69,29 @@ masquerade_tg(struct sk_buff *skb, const
+@@ -69,13 +69,27 @@ masquerade_tg(struct sk_buff *skb, const
  		return NF_ACCEPT;
  
  	mr = par->targinfo;
@@ -960,12 +960,10 @@
 -		return NF_DROP;
 +
 +	{
-+		struct flowi fl = { .nl_u = { .ip4_u =
-+					      { .daddr = ip_hdr(skb)->daddr,
-+						.tos = (RT_TOS(ip_hdr(skb)->tos) |
-+							RTO_CONN),
-+						.gw = skb_rtable(skb)->rt_gateway,
-+					      } },
++		struct flowi fl = { .fl4_dst = ip_hdr(skb)->daddr,
++				    .fl4_tos = (RT_TOS(ip_hdr(skb)->tos) |
++						RTO_CONN),
++				    .fl4_gw = skb_rtable(skb)->rt_gateway,
 +				    .mark = skb->mark,
 +				    .oif = par->out->ifindex };
 +		if (ip_route_output_key(dev_net(par->out), &rt, &fl) != 0) {
@@ -984,9 +982,9 @@
  	nat->masq_index = par->out->ifindex;
  
  	/* Transfer from original range. */
-diff -urp v2.6.37/linux/net/ipv4/netfilter/nf_nat_core.c linux/net/ipv4/netfilter/nf_nat_core.c
---- v2.6.37/linux/net/ipv4/netfilter/nf_nat_core.c	2011-01-06 00:01:22.000000000 +0200
-+++ linux/net/ipv4/netfilter/nf_nat_core.c	2011-01-08 17:21:40.097270104 +0200
+diff -urp v2.6.38/linux/net/ipv4/netfilter/nf_nat_core.c linux/net/ipv4/netfilter/nf_nat_core.c
+--- v2.6.38/linux/net/ipv4/netfilter/nf_nat_core.c	2011-03-20 12:01:11.000000000 +0200
++++ linux/net/ipv4/netfilter/nf_nat_core.c	2011-03-20 12:13:20.145247903 +0200
 @@ -711,6 +711,52 @@ static struct pernet_operations nf_nat_n
  	.exit = nf_nat_net_exit,
  };
@@ -1040,9 +1038,9 @@
  static int __init nf_nat_init(void)
  {
  	size_t i;
-diff -urp v2.6.37/linux/net/ipv4/netfilter/nf_nat_standalone.c linux/net/ipv4/netfilter/nf_nat_standalone.c
---- v2.6.37/linux/net/ipv4/netfilter/nf_nat_standalone.c	2010-10-22 11:34:38.000000000 +0300
-+++ linux/net/ipv4/netfilter/nf_nat_standalone.c	2011-01-08 17:21:40.097270104 +0200
+diff -urp v2.6.38/linux/net/ipv4/netfilter/nf_nat_standalone.c linux/net/ipv4/netfilter/nf_nat_standalone.c
+--- v2.6.38/linux/net/ipv4/netfilter/nf_nat_standalone.c	2011-03-20 12:01:11.000000000 +0200
++++ linux/net/ipv4/netfilter/nf_nat_standalone.c	2011-03-20 12:13:20.145247903 +0200
 @@ -249,6 +249,14 @@ static struct nf_hook_ops nf_nat_ops[] _
  		.hooknum	= NF_INET_PRE_ROUTING,
  		.priority	= NF_IP_PRI_NAT_DST,
@@ -1058,19 +1056,19 @@
  	/* After packet filtering, change source */
  	{
  		.hook		= nf_nat_out,
-diff -urp v2.6.37/linux/net/ipv4/route.c linux/net/ipv4/route.c
---- v2.6.37/linux/net/ipv4/route.c	2011-01-06 00:01:22.000000000 +0200
-+++ linux/net/ipv4/route.c	2011-01-08 17:21:40.100270360 +0200
-@@ -692,6 +692,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) |
+diff -urp v2.6.38/linux/net/ipv4/route.c linux/net/ipv4/route.c
+--- v2.6.38/linux/net/ipv4/route.c	2011-03-20 12:05:41.000000000 +0200
++++ linux/net/ipv4/route.c	2011-03-20 12:19:36.366249014 +0200
+@@ -697,6 +697,8 @@ static inline int compare_keys(struct fl
+ 	return (((__force u32)fl1->fl4_dst ^ (__force u32)fl2->fl4_dst) |
+ 		((__force u32)fl1->fl4_src ^ (__force u32)fl2->fl4_src) |
  		(fl1->mark ^ fl2->mark) |
-+		((__force u32)fl1->nl_u.ip4_u.lsrc ^ (__force u32)fl2->nl_u.ip4_u.lsrc) |
-+		((__force u32)fl1->nl_u.ip4_u.gw ^ (__force u32)fl2->nl_u.ip4_u.gw) |
- 		(*(u16 *)&fl1->nl_u.ip4_u.tos ^ *(u16 *)&fl2->nl_u.ip4_u.tos) |
++		((__force u32)fl1->fl4_lsrc ^ (__force u32)fl2->fl4_lsrc) |
++		((__force u32)fl1->fl4_gw ^ (__force u32)fl2->fl4_gw) |
+ 		(*(u16 *)&fl1->fl4_tos ^ *(u16 *)&fl2->fl4_tos) |
  		(fl1->oif ^ fl2->oif) |
  		(fl1->iif ^ fl2->iif)) == 0;
-@@ -1448,6 +1450,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;
@@ -1078,7 +1076,7 @@
  
  				/* Redirect received -> path was valid */
  				dst_confirm(&rth->dst);
-@@ -1902,6 +1905,7 @@ static int ip_route_input_mc(struct sk_b
+@@ -1890,6 +1893,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;
@@ -1086,15 +1084,15 @@
  	rth->rt_src	= saddr;
  #ifdef CONFIG_NET_CLS_ROUTE
  	rth->dst.tclassid = itag;
-@@ -1912,6 +1916,7 @@ static int ip_route_input_mc(struct sk_b
+@@ -1899,6 +1903,7 @@ static int ip_route_input_mc(struct sk_b
+ 	rth->dst.dev	= init_net.loopback_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));
-@@ -1975,7 +1980,7 @@ static int __mkroute_input(struct sk_buf
+@@ -1962,7 +1967,7 @@ static int __mkroute_input(struct sk_buf
  			   struct fib_result *res,
  			   struct in_device *in_dev,
  			   __be32 daddr, __be32 saddr, u32 tos,
@@ -1103,7 +1101,7 @@
  {
  	struct rtable *rth;
  	int err;
-@@ -2007,6 +2012,7 @@ static int __mkroute_input(struct sk_buf
+@@ -1994,6 +1999,7 @@ static int __mkroute_input(struct sk_buf
  		flags |= RTCF_DIRECTSRC;
  
  	if (out_dev == in_dev && err &&
@@ -1111,7 +1109,7 @@
  	    (IN_DEV_SHARED_MEDIA(out_dev) ||
  	     inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
  		flags |= RTCF_DOREDIRECT;
-@@ -2045,6 +2051,7 @@ static int __mkroute_input(struct sk_buf
+@@ -2032,12 +2038,14 @@ static int __mkroute_input(struct sk_buf
  	rth->fl.mark    = skb->mark;
  	rth->fl.fl4_src	= saddr;
  	rth->rt_src	= saddr;
@@ -1119,15 +1117,14 @@
  	rth->rt_gateway	= daddr;
  	rth->rt_iif 	=
  		rth->fl.iif	= in_dev->dev->ifindex;
-@@ -2052,6 +2059,7 @@ static int __mkroute_input(struct sk_buf
+ 	rth->dst.dev	= (out_dev)->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_spec_dst= spec_dst;
  
  	rth->dst.obsolete = -1;
-@@ -2071,21 +2079,23 @@ static int __mkroute_input(struct sk_buf
+@@ -2057,21 +2065,23 @@ static int __mkroute_input(struct sk_buf
  
  static int ip_mkroute_input(struct sk_buff *skb,
  			    struct fib_result *res,
@@ -1154,7 +1151,7 @@
  	if (err)
  		return err;
  
-@@ -2107,18 +2117,20 @@ static int ip_mkroute_input(struct sk_bu
+@@ -2093,16 +2103,18 @@ static int ip_mkroute_input(struct sk_bu
   */
  
  static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
@@ -1163,13 +1160,11 @@
  {
  	struct fib_result res;
  	struct in_device *in_dev = __in_dev_get_rcu(dev);
- 	struct flowi fl = { .nl_u = { .ip4_u =
- 				      { .daddr = daddr,
--					.saddr = saddr,
-+					.saddr = lsrc? : saddr,
- 					.tos = tos,
- 					.scope = RT_SCOPE_UNIVERSE,
- 				      } },
+ 	struct flowi fl = { .fl4_dst	= daddr,
+-			    .fl4_src	= saddr,
++			    .fl4_src	= lsrc? : saddr,
+ 			    .fl4_tos	= tos,
+ 			    .fl4_scope	= RT_SCOPE_UNIVERSE,
  			    .mark = skb->mark,
 -			    .iif = dev->ifindex };
 +			    .iif = lsrc?
@@ -1178,7 +1173,7 @@
  	unsigned	flags = 0;
  	u32		itag = 0;
  	struct rtable * rth;
-@@ -2152,6 +2164,12 @@ static int ip_route_input_slow(struct sk
+@@ -2136,6 +2148,12 @@ static int ip_route_input_slow(struct sk
  	if (ipv4_is_zeronet(daddr) || ipv4_is_loopback(daddr))
  		goto martian_destination;
  
@@ -1191,7 +1186,7 @@
  	/*
  	 *	Now we are ready to route packet.
  	 */
-@@ -2161,6 +2179,8 @@ static int ip_route_input_slow(struct sk
+@@ -2145,6 +2163,8 @@ static int ip_route_input_slow(struct sk
  			goto e_hostunreach;
  		goto no_route;
  	}
@@ -1200,7 +1195,7 @@
  
  	RT_CACHE_STAT_INC(in_slow_tot);
  
-@@ -2184,12 +2204,14 @@ static int ip_route_input_slow(struct sk
+@@ -2168,12 +2188,14 @@ static int ip_route_input_slow(struct sk
  	if (res.type != RTN_UNICAST)
  		goto martian_destination;
  
@@ -1216,15 +1211,15 @@
  
  	if (ipv4_is_zeronet(saddr))
  		spec_dst = inet_select_addr(dev, 0, RT_SCOPE_LINK);
-@@ -2232,6 +2254,7 @@ local_input:
+@@ -2215,6 +2237,7 @@ local_input:
+ 	rth->fl.iif	= dev->ifindex;
  	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->dst.input= ip_local_deliver;
-@@ -2284,8 +2307,9 @@ martian_source_keep_err:
+@@ -2267,8 +2290,9 @@ martian_source_keep_err:
  	goto out;
  }
  
@@ -1236,7 +1231,7 @@
  {
  	struct rtable * rth;
  	unsigned	hash;
-@@ -2308,6 +2332,7 @@ int ip_route_input_common(struct sk_buff
+@@ -2291,6 +2315,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) |
@@ -1244,7 +1239,7 @@
  		     rth->fl.oif |
  		     (rth->fl.fl4_tos ^ tos)) == 0 &&
  		    rth->fl.mark == skb->mark &&
-@@ -2361,12 +2386,25 @@ skip_cache:
+@@ -2344,12 +2369,25 @@ skip_cache:
  		rcu_read_unlock();
  		return -EINVAL;
  	}
@@ -1271,7 +1266,7 @@
  /* called with rcu_read_lock() */
  static int __mkroute_output(struct rtable **result,
  			    struct fib_result *res,
-@@ -2431,6 +2469,7 @@ static int __mkroute_output(struct rtabl
+@@ -2411,6 +2449,7 @@ static int __mkroute_output(struct rtabl
  	rth->fl.fl4_tos	= tos;
  	rth->fl.fl4_src	= oldflp->fl4_src;
  	rth->fl.oif	= oldflp->oif;
@@ -1279,15 +1274,15 @@
  	rth->fl.mark    = oldflp->mark;
  	rth->rt_dst	= fl->fl4_dst;
  	rth->rt_src	= fl->fl4_src;
-@@ -2509,6 +2548,7 @@ static int ip_route_output_slow(struct n
- 	struct flowi fl = { .nl_u = { .ip4_u =
- 				      { .daddr = oldflp->fl4_dst,
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.893&r2=1.894&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-routes.patch?r1=1.12&r2=1.13&f=u



More information about the pld-cvs-commit mailing list