SOURCES (LINUX_2_6): kernel-routes-2.6.22-15.diff - updated for 2....

arekm arekm at pld-linux.org
Fri Jan 18 17:44:54 CET 2008


Author: arekm                        Date: Fri Jan 18 16:44:54 2008 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- updated for 2.6.24

---- Files affected:
SOURCES:
   kernel-routes-2.6.22-15.diff (1.1.2.2 -> 1.1.2.3) 

---- Diffs:

================================================================
Index: SOURCES/kernel-routes-2.6.22-15.diff
diff -u SOURCES/kernel-routes-2.6.22-15.diff:1.1.2.2 SOURCES/kernel-routes-2.6.22-15.diff:1.1.2.3
--- SOURCES/kernel-routes-2.6.22-15.diff:1.1.2.2	Tue Oct  9 15:16:17 2007
+++ SOURCES/kernel-routes-2.6.22-15.diff	Fri Jan 18 17:44:49 2008
@@ -104,19 +104,24 @@
 diff -urp v2.6.22/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c
 --- v2.6.22/linux/net/ipv4/fib_frontend.c	2007-07-10 09:18:43.000000000 +0300
 +++ linux/net/ipv4/fib_frontend.c	2007-07-12 08:00:54.000000000 +0300
-@@ -57,8 +57,12 @@ struct fib_table *ip_fib_main_table;
+@@ -59,6 +59,8 @@
  #define FIB_TABLE_HASHSZ 1
  static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ];
  
 +#define FIB_RES_TABLE(r) (RT_TABLE_MAIN)
 +
- #else
- 
-+#define FIB_RES_TABLE(r) (fib_result_table(r))
-+
+ static void __init fib4_rules_init(void)
+ {
+ 	ip_fib_local_table = fib_hash_init(RT_TABLE_LOCAL);
+@@ -71,6 +73,8 @@
  #define FIB_TABLE_HASHSZ 256
  static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ];
  
++#define FIB_RES_TABLE(r) (fib_result_table(r))
++
+ struct fib_table *fib_new_table(u32 id)
+ {
+ 	struct fib_table *tb;
 @@ -189,6 +193,9 @@ int fib_validate_source(__be32 src, __be
  					.tos = tos } },
  			    .iif = oif };
@@ -834,7 +839,7 @@
  		return NF_ACCEPT;
  
  	mr = targinfo;
--	rt = (struct rtable *)(*pskb)->dst;
+-	rt = (struct rtable *)skb->dst;
 -	newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_UNIVERSE);
 -	if (!newsrc) {
 -		printk("MASQUERADE: %s ate my IP address\n", out->name);
@@ -842,12 +847,12 @@
 +
 +	{
 +		struct flowi fl = { .nl_u = { .ip4_u =
-+					      { .daddr = ip_hdr(*pskb)->daddr,
-+						.tos = (RT_TOS(ip_hdr(*pskb)->tos) |
++					      { .daddr = ip_hdr(skb)->daddr,
++						.tos = (RT_TOS(ip_hdr(skb)->tos) |
 +							RTO_CONN),
-+						.gw = ((struct rtable *) (*pskb)->dst)->rt_gateway,
++						.gw = ((struct rtable *) (skb)->dst)->rt_gateway,
 +					      } },
-+				    .mark = (*pskb)->mark,
++				    .mark = (skb)->mark,
 +				    .oif = out->ifindex };
 +		if (ip_route_output_key(&rt, &fl) != 0) {
 +			/* Funky routing can do this. */
@@ -1075,9 +1080,9 @@
  
 -	err = ip_mkroute_input(skb, &res, &fl, in_dev, daddr, saddr, tos);
 +	err = ip_mkroute_input(skb, &res, &fl, in_dev, daddr, saddr, tos, lsrc);
- 	if (err == -ENOBUFS)
- 		goto e_nobufs;
- 	if (err == -EINVAL)
+ done:
+ 	in_dev_put(in_dev);
+ 	if (free_res)
 @@ -1997,6 +2012,8 @@ out:	return err;
  brd_input:
  	if (skb->protocol != htons(ETH_P_IP))
@@ -1153,9 +1158,9 @@
  					.scope = ((tos & RTO_ONLINK) ?
  						  RT_SCOPE_LINK :
 @@ -2470,6 +2504,7 @@ static int ip_route_output_slow(struct r
- 		dev_out = &loopback_dev;
+ 		dev_out = init_net.loopback_dev;
  		dev_hold(dev_out);
- 		fl.oif = loopback_dev.ifindex;
+ 		fl.oif = init_net.loopback_dev->ifindex;
 +		fl.fl4_gw = 0;
  		res.type = RTN_LOCAL;
  		flags |= RTCF_LOCAL;
================================================================

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



More information about the pld-cvs-commit mailing list