SOURCES (LINUX_2_6): kernel-routes.patch - updated for 2.6.27.

pluto pluto at pld-linux.org
Fri Oct 17 10:41:12 CEST 2008


Author: pluto                        Date: Fri Oct 17 08:41:12 2008 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- updated for 2.6.27.

---- Files affected:
SOURCES:
   kernel-routes.patch (1.1.2.2 -> 1.1.2.3) 

---- Diffs:

================================================================
Index: SOURCES/kernel-routes.patch
diff -u SOURCES/kernel-routes.patch:1.1.2.2 SOURCES/kernel-routes.patch:1.1.2.3
--- SOURCES/kernel-routes.patch:1.1.2.2	Mon Sep  8 11:13:57 2008
+++ SOURCES/kernel-routes.patch	Fri Oct 17 10:41:07 2008
@@ -1,6 +1,6 @@
-diff -urp v2.6.26/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h
---- v2.6.26/linux/include/linux/rtnetlink.h	2008-07-14 09:58:50.000000000 +0300
-+++ linux/include/linux/rtnetlink.h	2008-07-16 09:15:57.000000000 +0300
+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
 @@ -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.26/linux/include/net/flow.h linux/include/net/flow.h
---- v2.6.26/linux/include/net/flow.h	2008-04-17 09:58:08.000000000 +0300
-+++ linux/include/net/flow.h	2008-07-16 09:16:29.000000000 +0300
+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
 @@ -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.26/linux/include/net/ip_fib.h linux/include/net/ip_fib.h
---- v2.6.26/linux/include/net/ip_fib.h	2008-04-17 09:58:08.000000000 +0300
-+++ linux/include/net/ip_fib.h	2008-07-16 09:15:57.000000000 +0300
+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
 @@ -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.26/linux/include/net/netfilter/nf_nat.h linux/include/net/netfilter/nf_nat.h
---- v2.6.26/linux/include/net/netfilter/nf_nat.h	2008-04-17 09:58:08.000000000 +0300
-+++ linux/include/net/netfilter/nf_nat.h	2008-07-16 09:16:29.000000000 +0300
+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
 @@ -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.26/linux/include/net/route.h linux/include/net/route.h
---- v2.6.26/linux/include/net/route.h	2008-07-14 09:58:50.000000000 +0300
-+++ linux/include/net/route.h	2008-07-16 09:16:29.000000000 +0300
+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
 @@ -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.26/linux/net/bridge/br_netfilter.c linux/net/bridge/br_netfilter.c
---- v2.6.26/linux/net/bridge/br_netfilter.c	2008-07-14 09:58:50.000000000 +0300
-+++ linux/net/bridge/br_netfilter.c	2008-07-16 09:16:29.000000000 +0300
-@@ -327,6 +327,10 @@ static int br_nf_pre_routing_finish(stru
+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
  	struct nf_bridge_info *nf_bridge = skb->nf_bridge;
  	int err;
  
@@ -92,10 +92,10 @@
  	if (nf_bridge->mask & BRNF_PKT_TYPE) {
  		skb->pkt_type = PACKET_OTHERHOST;
  		nf_bridge->mask ^= BRNF_PKT_TYPE;
-diff -urp v2.6.26/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c
---- v2.6.26/linux/net/ipv4/fib_frontend.c	2008-07-14 09:58:50.000000000 +0300
-+++ linux/net/ipv4/fib_frontend.c	2008-07-16 09:15:57.000000000 +0300
-@@ -49,6 +49,8 @@
+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
+@@ -47,6 +47,8 @@
  
  #ifndef CONFIG_IP_MULTIPLE_TABLES
  
@@ -104,7 +104,7 @@
  static int __net_init fib4_rules_init(struct net *net)
  {
  	struct fib_table *local_table, *main_table;
-@@ -73,6 +75,8 @@ fail:
+@@ -71,6 +73,8 @@ fail:
  }
  #else
  
@@ -113,7 +113,7 @@
  struct fib_table *fib_new_table(struct net *net, u32 id)
  {
  	struct fib_table *tb;
-@@ -127,7 +131,8 @@ void fib_select_default(struct net *net,
+@@ -125,7 +129,8 @@ void fib_select_default(struct net *net,
  	table = res->r->table;
  #endif
  	tb = fib_get_table(net, table);
@@ -123,7 +123,7 @@
  		tb->tb_select_default(tb, flp, res);
  }
  
-@@ -241,6 +246,9 @@ int fib_validate_source(__be32 src, __be
+@@ -239,6 +244,9 @@ int fib_validate_source(__be32 src, __be
  					.tos = tos } },
  			    .iif = oif };
  	struct fib_result res;
@@ -133,7 +133,7 @@
  	int no_addr, rpf;
  	int ret;
  	struct net *net;
-@@ -264,31 +272,35 @@ int fib_validate_source(__be32 src, __be
+@@ -262,31 +270,35 @@ int fib_validate_source(__be32 src, __be
  		goto e_inval_res;
  	*spec_dst = FIB_RES_PREFSRC(res);
  	fib_combine_itag(itag, &res);
@@ -176,30 +176,30 @@
  	return ret;
  
  last_resort:
-@@ -910,9 +922,7 @@ static int fib_inetaddr_event(struct not
+@@ -909,9 +921,7 @@ static int fib_inetaddr_event(struct not
  	switch (event) {
  	case NETDEV_UP:
  		fib_add_ifaddr(ifa);
 -#ifdef CONFIG_IP_ROUTE_MULTIPATH
- 		fib_sync_up(ifa->ifa_dev->dev);
+ 		fib_sync_up(dev);
 -#endif
- 		rt_cache_flush(-1);
+ 		rt_cache_flush(dev_net(dev), -1);
  		break;
  	case NETDEV_DOWN:
-@@ -948,9 +958,7 @@ static int fib_netdev_event(struct notif
+@@ -947,9 +957,7 @@ static int fib_netdev_event(struct notif
  		for_ifa(in_dev) {
  			fib_add_ifaddr(ifa);
  		} endfor_ifa(in_dev);
 -#ifdef CONFIG_IP_ROUTE_MULTIPATH
  		fib_sync_up(dev);
 -#endif
- 		rt_cache_flush(-1);
+ 		rt_cache_flush(dev_net(dev), -1);
  		break;
  	case NETDEV_DOWN:
-diff -urp v2.6.26/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c
---- v2.6.26/linux/net/ipv4/fib_hash.c	2008-07-14 09:58:50.000000000 +0300
-+++ linux/net/ipv4/fib_hash.c	2008-07-16 09:15:57.000000000 +0300
-@@ -280,25 +280,35 @@ out:
+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
+@@ -278,25 +278,35 @@ out:
  static void
  fn_hash_select_default(struct fib_table *tb, const struct flowi *flp, struct fib_result *res)
  {
@@ -238,7 +238,7 @@
  		list_for_each_entry(fa, &f->fn_alias, fa_list) {
  			struct fib_info *next_fi = fa->fa_info;
  
-@@ -306,42 +316,56 @@ fn_hash_select_default(struct fib_table 
+@@ -304,42 +314,56 @@ fn_hash_select_default(struct fib_table 
  			    fa->fa_type != RTN_UNICAST)
  				continue;
  
@@ -309,7 +309,7 @@
  out:
  	read_unlock(&fib_hash_lock);
  }
-@@ -465,6 +489,7 @@ static int fn_hash_insert(struct fib_tab
+@@ -463,6 +487,7 @@ static int fn_hash_insert(struct fib_tab
  			write_lock_bh(&fib_hash_lock);
  			fi_drop = fa->fa_info;
  			fa->fa_info = fi;
@@ -317,7 +317,7 @@
  			fa->fa_type = cfg->fc_type;
  			fa->fa_scope = cfg->fc_scope;
  			state = fa->fa_state;
-@@ -519,6 +544,7 @@ static int fn_hash_insert(struct fib_tab
+@@ -517,6 +542,7 @@ static int fn_hash_insert(struct fib_tab
  	new_fa->fa_type = cfg->fc_type;
  	new_fa->fa_scope = cfg->fc_scope;
  	new_fa->fa_state = 0;
@@ -325,9 +325,9 @@
  
  	/*
  	 * Insert new entry to the list.
-diff -urp v2.6.26/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h
---- v2.6.26/linux/net/ipv4/fib_lookup.h	2008-04-17 09:58:09.000000000 +0300
-+++ linux/net/ipv4/fib_lookup.h	2008-07-16 09:15:57.000000000 +0300
+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
 @@ -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.26/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c
---- v2.6.26/linux/net/ipv4/fib_rules.c	2008-07-14 09:58:50.000000000 +0300
-+++ linux/net/ipv4/fib_rules.c	2008-07-16 09:15:57.000000000 +0300
+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
 @@ -54,6 +54,11 @@ u32 fib_rules_tclass(struct fib_result *
  }
  #endif
@@ -361,10 +361,10 @@
  int fib_lookup(struct net *net, struct flowi *flp, struct fib_result *res)
  {
  	struct fib_lookup_arg arg = {
-diff -urp v2.6.26/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c
---- v2.6.26/linux/net/ipv4/fib_semantics.c	2008-07-14 09:58:50.000000000 +0300
-+++ linux/net/ipv4/fib_semantics.c	2008-07-16 09:16:29.000000000 +0300
-@@ -52,6 +52,7 @@ static struct hlist_head *fib_info_hash;
+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
+@@ -50,6 +50,7 @@ static struct hlist_head *fib_info_hash;
  static struct hlist_head *fib_info_laddrhash;
  static unsigned int fib_hash_size;
  static unsigned int fib_info_cnt;
@@ -372,7 +372,7 @@
  
  #define DEVINDEX_HASHBITS 8
  #define DEVINDEX_HASHSIZE (1U << DEVINDEX_HASHBITS)
-@@ -188,7 +189,7 @@ static __inline__ int nh_comp(const stru
+@@ -186,7 +187,7 @@ static __inline__ int nh_comp(const stru
  #ifdef CONFIG_NET_CLS_ROUTE
  		    nh->nh_tclassid != onh->nh_tclassid ||
  #endif
@@ -381,7 +381,7 @@
  			return -1;
  		onh++;
  	} endfor_nexthops(fi);
-@@ -239,7 +240,7 @@ static struct fib_info *fib_find_info(co
+@@ -237,7 +238,7 @@ static struct fib_info *fib_find_info(co
  		    nfi->fib_priority == fi->fib_priority &&
  		    memcmp(nfi->fib_metrics, fi->fib_metrics,
  			   sizeof(fi->fib_metrics)) == 0 &&
@@ -390,7 +390,7 @@
  		    (nfi->fib_nhs == 0 || nh_comp(fi, nfi) == 0))
  			return fi;
  	}
-@@ -350,26 +351,70 @@ struct fib_alias *fib_find_alias(struct 
+@@ -348,26 +349,70 @@ struct fib_alias *fib_find_alias(struct 
  }
  
  int fib_detect_death(struct fib_info *fi, int order,
@@ -477,7 +477,7 @@
  }
  
  #ifdef CONFIG_IP_ROUTE_MULTIPATH
-@@ -541,8 +586,11 @@ static int fib_check_nh(struct fib_confi
+@@ -539,8 +584,11 @@ static int fib_check_nh(struct fib_confi
  				return -EINVAL;
  			if ((dev = __dev_get_by_index(net, nh->nh_oif)) == NULL)
  				return -ENODEV;
@@ -491,7 +491,7 @@
  			nh->nh_dev = dev;
  			dev_hold(dev);
  			nh->nh_scope = RT_SCOPE_LINK;
-@@ -562,24 +610,48 @@ static int fib_check_nh(struct fib_confi
+@@ -560,24 +608,48 @@ static int fib_check_nh(struct fib_confi
  			/* It is not necessary, but requires a bit of thinking */
  			if (fl.fl4_scope < RT_SCOPE_LINK)
  				fl.fl4_scope = RT_SCOPE_LINK;
@@ -556,7 +556,7 @@
  	} else {
  		struct in_device *in_dev;
  
-@@ -590,8 +662,11 @@ out:
+@@ -588,8 +660,11 @@ out:
  		if (in_dev == NULL)
  			return -ENODEV;
  		if (!(in_dev->dev->flags&IFF_UP)) {
@@ -570,7 +570,7 @@
  		}
  		nh->nh_dev = in_dev->dev;
  		dev_hold(nh->nh_dev);
-@@ -901,8 +976,12 @@ int fib_semantic_match(struct list_head 
+@@ -899,8 +974,12 @@ int fib_semantic_match(struct list_head 
  				for_nexthops(fi) {
  					if (nh->nh_flags&RTNH_F_DEAD)
  						continue;
@@ -585,7 +585,7 @@
  				}
  #ifdef CONFIG_IP_ROUTE_MULTIPATH
  				if (nhsel < fi->fib_nhs) {
-@@ -1082,18 +1161,29 @@ int fib_sync_down_dev(struct net_device 
+@@ -1080,18 +1159,29 @@ int fib_sync_down_dev(struct net_device 
  		prev_fi = fi;
  		dead = 0;
  		change_nexthops(fi) {
@@ -623,7 +623,7 @@
  			}
  #ifdef CONFIG_IP_ROUTE_MULTIPATH
  			if (force > 1 && nh->nh_dev == dev) {
-@@ -1111,11 +1201,8 @@ int fib_sync_down_dev(struct net_device 
+@@ -1109,11 +1199,8 @@ int fib_sync_down_dev(struct net_device 
  	return ret;
  }
  
@@ -636,7 +636,7 @@
   */
  
  int fib_sync_up(struct net_device *dev)
-@@ -1125,8 +1212,10 @@ int fib_sync_up(struct net_device *dev)
+@@ -1123,8 +1210,10 @@ int fib_sync_up(struct net_device *dev)
  	struct hlist_head *head;
  	struct hlist_node *node;
  	struct fib_nh *nh;
@@ -648,7 +648,7 @@
  	if (!(dev->flags&IFF_UP))
  		return 0;
  
-@@ -1134,6 +1223,7 @@ int fib_sync_up(struct net_device *dev)
+@@ -1132,6 +1221,7 @@ int fib_sync_up(struct net_device *dev)
  	hash = fib_devindex_hashfn(dev->ifindex);
  	head = &fib_info_devhash[hash];
  	ret = 0;
@@ -656,7 +656,7 @@
  
  	hlist_for_each_entry(nh, node, head, nh_hash) {
  		struct fib_info *fi = nh->nh_parent;
-@@ -1146,19 +1236,39 @@ int fib_sync_up(struct net_device *dev)
+@@ -1144,19 +1234,39 @@ int fib_sync_up(struct net_device *dev)
  		prev_fi = fi;
  		alive = 0;
  		change_nexthops(fi) {
@@ -699,7 +699,7 @@
  		} endfor_nexthops(fi)
  
  		if (alive > 0) {
-@@ -1166,10 +1276,14 @@ int fib_sync_up(struct net_device *dev)
+@@ -1164,10 +1274,14 @@ int fib_sync_up(struct net_device *dev)
  			ret++;
  		}
  	}
@@ -714,7 +714,7 @@
  /*
     The algorithm is suboptimal, but it provides really
     fair weighted route distribution.
-@@ -1178,24 +1292,45 @@ int fib_sync_up(struct net_device *dev)
+@@ -1176,24 +1290,45 @@ 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;
@@ -768,7 +768,7 @@
  	}
  
  
-@@ -1205,20 +1340,40 @@ void fib_select_multipath(const struct f
+@@ -1203,20 +1338,40 @@ void fib_select_multipath(const struct f
  
  	w = jiffies % fi->fib_power;
  
@@ -812,10 +812,10 @@
  	spin_unlock_bh(&fib_multipath_lock);
  }
  #endif
-diff -urp v2.6.26/linux/net/ipv4/fib_trie.c linux/net/ipv4/fib_trie.c
---- v2.6.26/linux/net/ipv4/fib_trie.c	2008-07-14 09:58:50.000000000 +0300
-+++ linux/net/ipv4/fib_trie.c	2008-07-16 09:15:57.000000000 +0300
-@@ -1263,6 +1263,7 @@ static int fn_trie_insert(struct fib_tab
+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
+@@ -1261,6 +1261,7 @@ static int fn_trie_insert(struct fib_tab
  			fi_drop = fa->fa_info;
  			new_fa->fa_tos = fa->fa_tos;
  			new_fa->fa_info = fi;
@@ -823,7 +823,7 @@
  			new_fa->fa_type = cfg->fc_type;
  			new_fa->fa_scope = cfg->fc_scope;
  			state = fa->fa_state;
-@@ -1303,6 +1304,7 @@ static int fn_trie_insert(struct fib_tab
+@@ -1301,6 +1302,7 @@ static int fn_trie_insert(struct fib_tab
  	new_fa->fa_type = cfg->fc_type;
  	new_fa->fa_scope = cfg->fc_scope;
  	new_fa->fa_state = 0;
@@ -831,7 +831,7 @@
  	/*
  	 * Insert new entry to the list.
  	 */
-@@ -1804,24 +1806,31 @@ static void fn_trie_select_default(struc
+@@ -1802,24 +1804,31 @@ static void fn_trie_select_default(struc
  				   struct fib_result *res)
  {
  	struct trie *t = (struct trie *) tb->tb_data;
@@ -866,7 +866,7 @@
  	if (!fa_head)
  		goto out;
  
-@@ -1835,39 +1844,52 @@ static void fn_trie_select_default(struc
+@@ -1833,39 +1842,52 @@ static void fn_trie_select_default(struc
  		    fa->fa_type != RTN_UNICAST)
  			continue;
  
@@ -933,9 +933,9 @@
  out:
  	rcu_read_unlock();
  }
-diff -urp v2.6.26/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfilter/ipt_MASQUERADE.c
---- v2.6.26/linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2008-07-14 09:58:50.000000000 +0300
-+++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c	2008-07-16 09:16:29.000000000 +0300
+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
  	enum ip_conntrack_info ctinfo;
  	struct nf_nat_range newrange;
@@ -979,9 +979,9 @@
  	write_lock_bh(&masq_lock);
  	nat->masq_index = out->ifindex;
  	write_unlock_bh(&masq_lock);
-diff -urp v2.6.26/linux/net/ipv4/netfilter/nf_nat_core.c linux/net/ipv4/netfilter/nf_nat_core.c
---- v2.6.26/linux/net/ipv4/netfilter/nf_nat_core.c	2008-07-14 09:58:50.000000000 +0300
-+++ linux/net/ipv4/netfilter/nf_nat_core.c	2008-07-16 09:16:29.000000000 +0300
+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,
  };
@@ -1035,9 +1035,9 @@
  static int __init nf_nat_init(void)
  {
  	size_t i;
-diff -urp v2.6.26/linux/net/ipv4/netfilter/nf_nat_standalone.c linux/net/ipv4/netfilter/nf_nat_standalone.c
---- v2.6.26/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-07-16 09:16:29.000000000 +0300
+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
 @@ -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,10 @@
  	/* After packet filtering, change source */
  	{
  		.hook		= nf_nat_out,
-diff -urp v2.6.26/linux/net/ipv4/route.c linux/net/ipv4/route.c
---- v2.6.26/linux/net/ipv4/route.c	2008-07-14 09:58:50.000000000 +0300
-+++ linux/net/ipv4/route.c	2008-07-16 09:16:29.000000000 +0300
-@@ -1238,6 +1238,7 @@ void ip_rt_redirect(__be32 old_gw, __be3
+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
  
  				/* Gateway is different ... */
  				rt->rt_gateway		= new_gw;
@@ -1064,7 +1064,7 @@
  
  				/* Redirect received -> path was valid */
  				dst_confirm(&rth->u.dst);
-@@ -1684,6 +1685,7 @@ static int ip_route_input_mc(struct sk_b
+@@ -1725,6 +1726,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,15 +1072,15 @@
  	rth->rt_src	= saddr;
  #ifdef CONFIG_NET_CLS_ROUTE
  	rth->u.dst.tclassid = itag;
-@@ -1694,6 +1696,7 @@ static int ip_route_input_mc(struct sk_b
+@@ -1735,6 +1737,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;
 +	rth->fl.fl4_gw	= 0;
  	rth->rt_gateway	= daddr;
  	rth->rt_spec_dst= spec_dst;
- 	rth->rt_genid	= atomic_read(&rt_genid);
-@@ -1759,7 +1762,7 @@ static int __mkroute_input(struct sk_buf
+ 	rth->rt_genid	= rt_genid(dev_net(dev));
+@@ -1800,7 +1803,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 +1089,7 @@
  {
  
  	struct rtable *rth;
-@@ -1793,6 +1796,7 @@ static int __mkroute_input(struct sk_buf
+@@ -1834,6 +1837,7 @@ static int __mkroute_input(struct sk_buf
  		flags |= RTCF_DIRECTSRC;
  
  	if (out_dev == in_dev && err &&
@@ -1097,7 +1097,7 @@
  	    (IN_DEV_SHARED_MEDIA(out_dev) ||
  	     inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
  		flags |= RTCF_DOREDIRECT;
-@@ -1826,6 +1830,7 @@ static int __mkroute_input(struct sk_buf
+@@ -1867,6 +1871,7 @@ static int __mkroute_input(struct sk_buf
  	rth->fl.mark    = skb->mark;
  	rth->fl.fl4_src	= saddr;
  	rth->rt_src	= saddr;
@@ -1105,7 +1105,7 @@
  	rth->rt_gateway	= daddr;
  	rth->rt_iif 	=
  		rth->fl.iif	= in_dev->dev->ifindex;
-@@ -1833,6 +1838,7 @@ static int __mkroute_input(struct sk_buf
+@@ -1874,6 +1879,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 +1113,7 @@
  	rth->rt_spec_dst= spec_dst;
  
  	rth->u.dst.input = ip_forward;
-@@ -1853,21 +1859,23 @@ static int __mkroute_input(struct sk_buf
+@@ -1894,21 +1900,23 @@ static int __mkroute_input(struct sk_buf
  
  static int ip_mkroute_input(struct sk_buff *skb,
  			    struct fib_result *res,
@@ -1140,7 +1140,7 @@
  	if (err)
  		return err;
  
-@@ -1887,18 +1895,19 @@ static int ip_mkroute_input(struct sk_bu
+@@ -1929,18 +1937,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 +1163,7 @@
  	unsigned	flags = 0;
  	u32		itag = 0;
  	struct rtable * rth;
-@@ -1934,6 +1943,12 @@ static int ip_route_input_slow(struct sk
+@@ -1976,6 +1985,12 @@ static int ip_route_input_slow(struct sk
  	    ipv4_is_loopback(daddr))
  		goto martian_destination;
  
@@ -1176,7 +1176,7 @@
  	/*
  	 *	Now we are ready to route packet.
  	 */
-@@ -1943,6 +1958,8 @@ static int ip_route_input_slow(struct sk
+@@ -1985,6 +2000,8 @@ static int ip_route_input_slow(struct sk
  		goto no_route;
  	}
  	free_res = 1;
@@ -1185,7 +1185,7 @@
  
  	RT_CACHE_STAT_INC(in_slow_tot);
  
-@@ -1967,7 +1984,7 @@ static int ip_route_input_slow(struct sk
+@@ -2009,7 +2026,7 @@ static int ip_route_input_slow(struct sk
  	if (res.type != RTN_UNICAST)
  		goto martian_destination;
  
@@ -1194,7 +1194,7 @@
  done:
  	in_dev_put(in_dev);
  	if (free_res)
-@@ -1977,6 +1994,8 @@ out:	return err;
+@@ -2019,6 +2036,8 @@ out:	return err;
  brd_input:
  	if (skb->protocol != htons(ETH_P_IP))
  		goto e_inval;
@@ -1203,7 +1203,7 @@
  
  	if (ipv4_is_zeronet(saddr))
  		spec_dst = inet_select_addr(dev, 0, RT_SCOPE_LINK);
-@@ -2018,6 +2037,7 @@ local_input:
+@@ -2060,6 +2079,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 +1211,7 @@
  	rth->rt_gateway	= daddr;
  	rth->rt_spec_dst= spec_dst;
  	rth->u.dst.input= ip_local_deliver;
-@@ -2069,8 +2089,9 @@ martian_source:
+@@ -2111,8 +2131,9 @@ martian_source:
  	goto e_inval;
<<Diff was trimmed, longer than 597 lines>>

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



More information about the pld-cvs-commit mailing list