SOURCES: kernel-desktop-routes.patch - update from kernel-routes-2...
glen
glen at pld-linux.org
Wed Apr 9 01:18:29 CEST 2008
Author: glen Date: Tue Apr 8 23:18:29 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- update from kernel-routes-2.6.24-15.diff,1.1.2.1
---- Files affected:
SOURCES:
kernel-desktop-routes.patch (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/kernel-desktop-routes.patch
diff -u SOURCES/kernel-desktop-routes.patch:1.1 SOURCES/kernel-desktop-routes.patch:1.2
--- SOURCES/kernel-desktop-routes.patch:1.1 Thu Aug 23 14:10:35 2007
+++ SOURCES/kernel-desktop-routes.patch Wed Apr 9 01:18:24 2008
@@ -1,7 +1,7 @@
-diff -urp v2.6.22/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h
---- v2.6.22/linux/include/linux/rtnetlink.h 2007-07-10 09:18:42.000000000 +0300
-+++ linux/include/linux/rtnetlink.h 2007-07-12 08:00:54.000000000 +0300
-@@ -293,6 +293,8 @@ struct rtnexthop
+diff -urp v2.6.24/linux/include/linux/rtnetlink.h linux/include/linux/rtnetlink.h
+--- v2.6.24/linux/include/linux/rtnetlink.h 2008-01-25 10:45:05.000000000 +0200
++++ linux/include/linux/rtnetlink.h 2008-01-27 16:03:55.000000000 +0200
+@@ -296,6 +296,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.22/linux/include/net/flow.h linux/include/net/flow.h
---- v2.6.22/linux/include/net/flow.h 2007-07-10 09:18:42.000000000 +0300
-+++ linux/include/net/flow.h 2007-07-12 08:00:54.000000000 +0300
+diff -urp v2.6.24/linux/include/net/flow.h linux/include/net/flow.h
+--- v2.6.24/linux/include/net/flow.h 2007-10-10 11:12:13.000000000 +0300
++++ linux/include/net/flow.h 2008-01-27 16:04:16.000000000 +0200
@@ -19,6 +19,8 @@ struct flowi {
struct {
__be32 daddr;
@@ -31,10 +31,10 @@
#define fl4_tos nl_u.ip4_u.tos
#define fl4_scope nl_u.ip4_u.scope
-diff -urp v2.6.22/linux/include/net/ip_fib.h linux/include/net/ip_fib.h
---- v2.6.22/linux/include/net/ip_fib.h 2007-07-10 09:18:42.000000000 +0300
-+++ linux/include/net/ip_fib.h 2007-07-12 08:00:54.000000000 +0300
-@@ -196,7 +196,8 @@ static inline int fib_lookup(const struc
+diff -urp v2.6.24/linux/include/net/ip_fib.h linux/include/net/ip_fib.h
+--- v2.6.24/linux/include/net/ip_fib.h 2008-01-25 10:45:05.000000000 +0200
++++ linux/include/net/ip_fib.h 2008-01-27 16:03:55.000000000 +0200
+@@ -180,7 +180,8 @@ static inline int fib_lookup(const struc
static inline void fib_select_default(const struct flowi *flp, struct fib_result *res)
{
@@ -44,7 +44,7 @@
ip_fib_main_table->tb_select_default(ip_fib_main_table, flp, res);
}
-@@ -209,6 +210,7 @@ extern int fib_lookup(struct flowi *flp,
+@@ -199,6 +200,7 @@ extern int fib_lookup(struct flowi *flp,
extern struct fib_table *fib_new_table(u32 id);
extern struct fib_table *fib_get_table(u32 id);
extern void fib_select_default(const struct flowi *flp, struct fib_result *res);
@@ -52,23 +52,23 @@
#endif /* CONFIG_IP_MULTIPLE_TABLES */
-@@ -278,4 +280,6 @@ extern int fib_proc_init(void);
+@@ -259,4 +261,6 @@ extern int fib_proc_init(void);
extern void fib_proc_exit(void);
#endif
+extern rwlock_t fib_nhflags_lock;
+
#endif /* _NET_FIB_H */
-diff -urp v2.6.22/linux/include/net/netfilter/nf_nat.h linux/include/net/netfilter/nf_nat.h
---- v2.6.22/linux/include/net/netfilter/nf_nat.h 2007-04-28 17:55:11.000000000 +0300
-+++ linux/include/net/netfilter/nf_nat.h 2007-07-12 08:00:54.000000000 +0300
-@@ -61,6 +61,13 @@ struct nf_nat_info
-
- struct nf_conn;
+diff -urp v2.6.24/linux/include/net/netfilter/nf_nat.h linux/include/net/netfilter/nf_nat.h
+--- v2.6.24/linux/include/net/netfilter/nf_nat.h 2007-10-10 11:12:13.000000000 +0300
++++ linux/include/net/netfilter/nf_nat.h 2008-01-27 16:04:16.000000000 +0200
+@@ -76,6 +76,13 @@ struct nf_conn_nat
+ #endif
+ };
+/* Call input routing for SNAT-ed traffic */
+extern unsigned int ip_nat_route_input(unsigned int hooknum,
-+ struct sk_buff **pskb,
++ struct sk_buff *skb,
+ const struct net_device *in,
+ const struct net_device *out,
+ int (*okfn)(struct sk_buff *));
@@ -76,10 +76,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.22/linux/include/net/route.h linux/include/net/route.h
---- v2.6.22/linux/include/net/route.h 2007-04-28 17:55:11.000000000 +0300
-+++ linux/include/net/route.h 2007-07-12 08:00:54.000000000 +0300
-@@ -116,6 +116,7 @@ extern int __ip_route_output_key(struct
+diff -urp v2.6.24/linux/include/net/route.h linux/include/net/route.h
+--- v2.6.24/linux/include/net/route.h 2008-01-25 10:45:05.000000000 +0200
++++ linux/include/net/route.h 2008-01-27 16:04:16.000000000 +0200
+@@ -114,6 +114,7 @@ extern int __ip_route_output_key(struct
extern int ip_route_output_key(struct rtable **, struct flowi *flp);
extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);
extern int ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, struct net_device *devin);
@@ -87,10 +87,10 @@
extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu);
extern void ip_rt_send_redirect(struct sk_buff *skb);
-diff -urp v2.6.22/linux/net/bridge/br_netfilter.c linux/net/bridge/br_netfilter.c
---- v2.6.22/linux/net/bridge/br_netfilter.c 2007-07-10 09:18:43.000000000 +0300
-+++ linux/net/bridge/br_netfilter.c 2007-07-12 08:00:54.000000000 +0300
-@@ -301,6 +301,10 @@ static int br_nf_pre_routing_finish(stru
+diff -urp v2.6.24/linux/net/bridge/br_netfilter.c linux/net/bridge/br_netfilter.c
+--- v2.6.24/linux/net/bridge/br_netfilter.c 2008-01-25 10:45:06.000000000 +0200
++++ linux/net/bridge/br_netfilter.c 2008-01-27 16:04:16.000000000 +0200
+@@ -324,6 +324,10 @@ static int br_nf_pre_routing_finish(stru
struct nf_bridge_info *nf_bridge = skb->nf_bridge;
int err;
@@ -101,15 +101,20 @@
if (nf_bridge->mask & BRNF_PKT_TYPE) {
skb->pkt_type = PACKET_OTHERHOST;
nf_bridge->mask ^= BRNF_PKT_TYPE;
-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;
+diff -urp v2.6.24/linux/net/ipv4/fib_frontend.c linux/net/ipv4/fib_frontend.c
+--- v2.6.24/linux/net/ipv4/fib_frontend.c 2008-01-25 10:45:06.000000000 +0200
++++ linux/net/ipv4/fib_frontend.c 2008-01-27 16:03:55.000000000 +0200
+@@ -59,6 +59,8 @@ struct fib_table *ip_fib_main_table;
#define FIB_TABLE_HASHSZ 1
static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ];
+#define FIB_RES_TABLE(r) (RT_TABLE_MAIN)
+
+ static void __init fib4_rules_init(void)
+ {
+ ip_fib_local_table = fib_hash_init(RT_TABLE_LOCAL);
+@@ -68,6 +70,8 @@ static void __init fib4_rules_init(void)
+ }
#else
+#define FIB_RES_TABLE(r) (fib_result_table(r))
@@ -117,7 +122,7 @@
#define FIB_TABLE_HASHSZ 256
static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ];
-@@ -189,6 +193,9 @@ int fib_validate_source(__be32 src, __be
+@@ -200,6 +204,9 @@ int fib_validate_source(__be32 src, __be
.tos = tos } },
.iif = oif };
struct fib_result res;
@@ -127,7 +132,7 @@
int no_addr, rpf;
int ret;
-@@ -210,31 +217,35 @@ int fib_validate_source(__be32 src, __be
+@@ -221,31 +228,35 @@ int fib_validate_source(__be32 src, __be
goto e_inval_res;
*spec_dst = FIB_RES_PREFSRC(res);
fib_combine_itag(itag, &res);
@@ -170,7 +175,7 @@
return ret;
last_resort:
-@@ -839,9 +850,7 @@ static int fib_inetaddr_event(struct not
+@@ -844,9 +855,7 @@ static int fib_inetaddr_event(struct not
switch (event) {
case NETDEV_UP:
fib_add_ifaddr(ifa);
@@ -180,7 +185,7 @@
rt_cache_flush(-1);
break;
case NETDEV_DOWN:
-@@ -877,9 +886,7 @@ static int fib_netdev_event(struct notif
+@@ -885,9 +894,7 @@ static int fib_netdev_event(struct notif
for_ifa(in_dev) {
fib_add_ifaddr(ifa);
} endfor_ifa(in_dev);
@@ -190,10 +195,10 @@
rt_cache_flush(-1);
break;
case NETDEV_DOWN:
-diff -urp v2.6.22/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c
---- v2.6.22/linux/net/ipv4/fib_hash.c 2007-07-10 09:18:43.000000000 +0300
-+++ linux/net/ipv4/fib_hash.c 2007-07-12 08:00:54.000000000 +0300
-@@ -274,30 +274,38 @@ out:
+diff -urp v2.6.24/linux/net/ipv4/fib_hash.c linux/net/ipv4/fib_hash.c
+--- v2.6.24/linux/net/ipv4/fib_hash.c 2008-01-25 10:45:06.000000000 +0200
++++ linux/net/ipv4/fib_hash.c 2008-01-27 16:03:55.000000000 +0200
+@@ -275,30 +275,38 @@ out:
return err;
}
@@ -237,7 +242,7 @@
list_for_each_entry(fa, &f->fn_alias, fa_list) {
struct fib_info *next_fi = fa->fa_info;
-@@ -305,41 +313,52 @@ fn_hash_select_default(struct fib_table
+@@ -306,41 +314,52 @@ fn_hash_select_default(struct fib_table
fa->fa_type != RTN_UNICAST)
continue;
@@ -302,7 +307,7 @@
goto out;
}
-@@ -349,8 +368,11 @@ fn_hash_select_default(struct fib_table
+@@ -350,8 +369,11 @@ fn_hash_select_default(struct fib_table
res->fi = last_resort;
if (last_resort)
atomic_inc(&last_resort->fib_clntref);
@@ -315,7 +320,7 @@
out:
read_unlock(&fib_hash_lock);
}
-@@ -446,6 +468,7 @@ static int fn_hash_insert(struct fib_tab
+@@ -450,6 +472,7 @@ static int fn_hash_insert(struct fib_tab
write_lock_bh(&fib_hash_lock);
fi_drop = fa->fa_info;
fa->fa_info = fi;
@@ -323,7 +328,7 @@
fa->fa_type = cfg->fc_type;
fa->fa_scope = cfg->fc_scope;
state = fa->fa_state;
-@@ -507,6 +530,7 @@ static int fn_hash_insert(struct fib_tab
+@@ -511,6 +534,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;
@@ -331,9 +336,9 @@
/*
* Insert new entry to the list.
-diff -urp v2.6.22/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h
---- v2.6.22/linux/net/ipv4/fib_lookup.h 2007-07-10 09:18:43.000000000 +0300
-+++ linux/net/ipv4/fib_lookup.h 2007-07-12 08:00:54.000000000 +0300
+diff -urp v2.6.24/linux/net/ipv4/fib_lookup.h linux/net/ipv4/fib_lookup.h
+--- v2.6.24/linux/net/ipv4/fib_lookup.h 2007-07-10 09:18:43.000000000 +0300
++++ linux/net/ipv4/fib_lookup.h 2008-01-27 16:03:55.000000000 +0200
@@ -9,6 +9,7 @@ struct fib_alias {
struct list_head fa_list;
struct rcu_head rcu;
@@ -351,10 +356,10 @@
+ const struct flowi *flp);
#endif /* _FIB_LOOKUP_H */
-diff -urp v2.6.22/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c
---- v2.6.22/linux/net/ipv4/fib_rules.c 2007-07-10 09:18:43.000000000 +0300
-+++ linux/net/ipv4/fib_rules.c 2007-07-12 08:00:54.000000000 +0300
-@@ -85,6 +85,11 @@ u32 fib_rules_tclass(struct fib_result *
+diff -urp v2.6.24/linux/net/ipv4/fib_rules.c linux/net/ipv4/fib_rules.c
+--- v2.6.24/linux/net/ipv4/fib_rules.c 2008-01-25 10:45:06.000000000 +0200
++++ linux/net/ipv4/fib_rules.c 2008-01-27 16:03:55.000000000 +0200
+@@ -56,6 +56,11 @@ u32 fib_rules_tclass(struct fib_result *
}
#endif
@@ -366,7 +371,7 @@
int fib_lookup(struct flowi *flp, struct fib_result *res)
{
struct fib_lookup_arg arg = {
-@@ -136,7 +141,8 @@ errout:
+@@ -107,7 +112,8 @@ errout:
void fib_select_default(const struct flowi *flp, struct fib_result *res)
{
if (res->r && res->r->action == FR_ACT_TO_TBL &&
@@ -376,10 +381,10 @@
struct fib_table *tb;
if ((tb = fib_get_table(res->r->table)) != NULL)
tb->tb_select_default(tb, flp, res);
-diff -urp v2.6.22/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c
---- v2.6.22/linux/net/ipv4/fib_semantics.c 2007-07-10 09:18:43.000000000 +0300
-+++ linux/net/ipv4/fib_semantics.c 2007-07-12 08:00:54.000000000 +0300
-@@ -55,6 +55,7 @@ static struct hlist_head *fib_info_hash;
+diff -urp v2.6.24/linux/net/ipv4/fib_semantics.c linux/net/ipv4/fib_semantics.c
+--- v2.6.24/linux/net/ipv4/fib_semantics.c 2008-01-25 10:45:06.000000000 +0200
++++ linux/net/ipv4/fib_semantics.c 2008-01-27 16:04:16.000000000 +0200
+@@ -54,6 +54,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;
@@ -387,7 +392,7 @@
#define DEVINDEX_HASHBITS 8
#define DEVINDEX_HASHSIZE (1U << DEVINDEX_HASHBITS)
-@@ -190,7 +191,7 @@ static __inline__ int nh_comp(const stru
+@@ -189,7 +190,7 @@ static __inline__ int nh_comp(const stru
#ifdef CONFIG_NET_CLS_ROUTE
nh->nh_tclassid != onh->nh_tclassid ||
#endif
@@ -396,7 +401,7 @@
return -1;
onh++;
} endfor_nexthops(fi);
-@@ -227,7 +228,7 @@ static struct fib_info *fib_find_info(co
+@@ -226,7 +227,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 &&
@@ -405,7 +410,7 @@
(nfi->fib_nhs == 0 || nh_comp(fi, nfi) == 0))
return fi;
}
-@@ -347,26 +348,70 @@ struct fib_alias *fib_find_alias(struct
+@@ -346,26 +347,70 @@ struct fib_alias *fib_find_alias(struct
}
int fib_detect_death(struct fib_info *fi, int order,
@@ -492,9 +497,9 @@
}
#ifdef CONFIG_IP_ROUTE_MULTIPATH
-@@ -536,8 +581,11 @@ static int fib_check_nh(struct fib_confi
+@@ -535,8 +580,11 @@ static int fib_check_nh(struct fib_confi
return -EINVAL;
- if ((dev = __dev_get_by_index(nh->nh_oif)) == NULL)
+ if ((dev = __dev_get_by_index(&init_net, nh->nh_oif)) == NULL)
return -ENODEV;
- if (!(dev->flags&IFF_UP))
- return -ENETDOWN;
@@ -506,7 +511,7 @@
nh->nh_dev = dev;
dev_hold(dev);
nh->nh_scope = RT_SCOPE_LINK;
-@@ -557,24 +605,48 @@ static int fib_check_nh(struct fib_confi
+@@ -556,24 +604,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;
@@ -571,7 +576,7 @@
} else {
struct in_device *in_dev;
-@@ -585,8 +657,11 @@ out:
+@@ -584,8 +656,11 @@ out:
if (in_dev == NULL)
return -ENODEV;
if (!(in_dev->dev->flags&IFF_UP)) {
@@ -585,7 +590,7 @@
}
nh->nh_dev = in_dev->dev;
dev_hold(nh->nh_dev);
-@@ -909,8 +984,12 @@ int fib_semantic_match(struct list_head
+@@ -897,8 +972,12 @@ int fib_semantic_match(struct list_head
for_nexthops(fi) {
if (nh->nh_flags&RTNH_F_DEAD)
continue;
@@ -600,7 +605,7 @@
}
#ifdef CONFIG_IP_ROUTE_MULTIPATH
if (nhsel < fi->fib_nhs) {
-@@ -1085,18 +1164,29 @@ int fib_sync_down(__be32 local, struct n
+@@ -1069,18 +1148,29 @@ int fib_sync_down(__be32 local, struct n
prev_fi = fi;
dead = 0;
change_nexthops(fi) {
@@ -638,7 +643,7 @@
}
#ifdef CONFIG_IP_ROUTE_MULTIPATH
if (force > 1 && nh->nh_dev == dev) {
-@@ -1115,11 +1205,8 @@ int fib_sync_down(__be32 local, struct n
+@@ -1099,11 +1189,8 @@ int fib_sync_down(__be32 local, struct n
return ret;
}
@@ -651,7 +656,7 @@
*/
int fib_sync_up(struct net_device *dev)
-@@ -1129,8 +1216,10 @@ int fib_sync_up(struct net_device *dev)
+@@ -1113,8 +1200,10 @@ int fib_sync_up(struct net_device *dev)
struct hlist_head *head;
struct hlist_node *node;
struct fib_nh *nh;
@@ -663,7 +668,7 @@
if (!(dev->flags&IFF_UP))
return 0;
-@@ -1138,6 +1227,7 @@ int fib_sync_up(struct net_device *dev)
+@@ -1122,6 +1211,7 @@ int fib_sync_up(struct net_device *dev)
hash = fib_devindex_hashfn(dev->ifindex);
head = &fib_info_devhash[hash];
ret = 0;
@@ -671,7 +676,7 @@
hlist_for_each_entry(nh, node, head, nh_hash) {
struct fib_info *fi = nh->nh_parent;
-@@ -1150,19 +1240,39 @@ int fib_sync_up(struct net_device *dev)
+@@ -1134,19 +1224,39 @@ int fib_sync_up(struct net_device *dev)
prev_fi = fi;
alive = 0;
change_nexthops(fi) {
@@ -714,7 +719,7 @@
} endfor_nexthops(fi)
if (alive > 0) {
-@@ -1170,10 +1280,14 @@ int fib_sync_up(struct net_device *dev)
+@@ -1154,10 +1264,14 @@ int fib_sync_up(struct net_device *dev)
ret++;
}
}
@@ -729,7 +734,7 @@
/*
The algorithm is suboptimal, but it provides really
fair weighted route distribution.
-@@ -1182,24 +1296,45 @@ int fib_sync_up(struct net_device *dev)
+@@ -1166,24 +1280,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;
@@ -783,7 +788,7 @@
}
-@@ -1209,20 +1344,40 @@ void fib_select_multipath(const struct f
+@@ -1193,20 +1328,40 @@ void fib_select_multipath(const struct f
w = jiffies % fi->fib_power;
@@ -827,14 +832,23 @@
spin_unlock_bh(&fib_multipath_lock);
}
#endif
-diff -urp v2.6.22/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfilter/ipt_MASQUERADE.c
---- v2.6.22/linux/net/ipv4/netfilter/ipt_MASQUERADE.c 2007-07-10 09:18:43.000000000 +0300
-+++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c 2007-07-11 10:00:30.000000000 +0300
-@@ -88,13 +88,29 @@ masquerade_target(struct sk_buff **pskb,
+diff -urp v2.6.24/linux/net/ipv4/netfilter/ipt_MASQUERADE.c linux/net/ipv4/netfilter/ipt_MASQUERADE.c
+--- v2.6.24/linux/net/ipv4/netfilter/ipt_MASQUERADE.c 2008-01-25 10:45:06.000000000 +0200
++++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c 2008-01-27 16:04:16.000000000 +0200
+@@ -64,7 +64,7 @@ masquerade_target(struct sk_buff *skb,
+ enum ip_conntrack_info ctinfo;
+ struct nf_nat_range newrange;
+ const struct nf_nat_multi_range_compat *mr;
+- const struct rtable *rt;
++ struct rtable *rt;
+ __be32 newsrc;
+
+ NF_CT_ASSERT(hooknum == NF_IP_POST_ROUTING);
+@@ -82,13 +82,28 @@ masquerade_target(struct sk_buff *skb,
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 +856,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. */
@@ -859,27 +873,25 @@
}
+ newsrc = rt->rt_src;
-+ DEBUGP("newsrc = %u.%u.%u.%u\n", NIPQUAD(newsrc));
+ ip_rt_put(rt);
+
write_lock_bh(&masq_lock);
nat->masq_index = out->ifindex;
write_unlock_bh(&masq_lock);
-diff -urp v2.6.22/linux/net/ipv4/netfilter/nf_nat_core.c linux/net/ipv4/netfilter/nf_nat_core.c
---- v2.6.22/linux/net/ipv4/netfilter/nf_nat_core.c 2007-07-10 09:18:43.000000000 +0300
-+++ linux/net/ipv4/netfilter/nf_nat_core.c 2007-07-11 10:02:05.000000000 +0300
-@@ -590,6 +590,53 @@ nf_nat_port_nfattr_to_range(struct nfatt
- EXPORT_SYMBOL_GPL(nf_nat_port_range_to_nfattr);
- #endif
+diff -urp v2.6.24/linux/net/ipv4/netfilter/nf_nat_core.c linux/net/ipv4/netfilter/nf_nat_core.c
+--- v2.6.24/linux/net/ipv4/netfilter/nf_nat_core.c 2008-01-25 10:45:06.000000000 +0200
++++ linux/net/ipv4/netfilter/nf_nat_core.c 2008-01-27 16:04:16.000000000 +0200
+@@ -626,6 +626,52 @@ static struct nf_ct_ext_type nat_extend
+ .flags = NF_CT_EXT_F_PREALLOC,
+ };
+unsigned int
+ip_nat_route_input(unsigned int hooknum,
-+ struct sk_buff **pskb,
++ struct sk_buff *skb,
+ const struct net_device *in,
+ const struct net_device *out,
+ int (*okfn)(struct sk_buff *))
+{
-+ struct sk_buff *skb = *pskb;
+ struct iphdr *iph;
+ struct nf_conn *conn;
+ enum ip_conntrack_info ctinfo;
@@ -922,9 +934,9 @@
static int __init nf_nat_init(void)
{
size_t i;
-diff -urp v2.6.22/linux/net/ipv4/netfilter/nf_nat_standalone.c linux/net/ipv4/netfilter/nf_nat_standalone.c
---- v2.6.22/linux/net/ipv4/netfilter/nf_nat_standalone.c 2007-07-10 09:18:43.000000000 +0300
-+++ linux/net/ipv4/netfilter/nf_nat_standalone.c 2007-07-12 08:00:54.000000000 +0300
+diff -urp v2.6.24/linux/net/ipv4/netfilter/nf_nat_standalone.c linux/net/ipv4/netfilter/nf_nat_standalone.c
+--- v2.6.24/linux/net/ipv4/netfilter/nf_nat_standalone.c 2008-01-25 10:45:06.000000000 +0200
++++ linux/net/ipv4/netfilter/nf_nat_standalone.c 2008-01-27 16:04:16.000000000 +0200
@@ -282,6 +282,14 @@ static struct nf_hook_ops nf_nat_ops[] =
.hooknum = NF_IP_PRE_ROUTING,
.priority = NF_IP_PRI_NAT_DST,
@@ -940,10 +952,10 @@
/* After packet filtering, change source */
{
.hook = nf_nat_out,
-diff -urp v2.6.22/linux/net/ipv4/route.c linux/net/ipv4/route.c
---- v2.6.22/linux/net/ipv4/route.c 2007-07-10 09:18:43.000000000 +0300
-+++ linux/net/ipv4/route.c 2007-07-12 08:00:54.000000000 +0300
-@@ -1208,6 +1208,7 @@ void ip_rt_redirect(__be32 old_gw, __be3
+diff -urp v2.6.24/linux/net/ipv4/route.c linux/net/ipv4/route.c
+--- v2.6.24/linux/net/ipv4/route.c 2008-01-25 10:45:06.000000000 +0200
++++ linux/net/ipv4/route.c 2008-01-27 16:04:16.000000000 +0200
+@@ -1100,6 +1100,7 @@ void ip_rt_redirect(__be32 old_gw, __be3
/* Gateway is different ... */
rt->rt_gateway = new_gw;
@@ -951,7 +963,7 @@
/* Redirect received -> path was valid */
dst_confirm(&rth->u.dst);
-@@ -1643,6 +1644,7 @@ static int ip_route_input_mc(struct sk_b
+@@ -1536,6 +1537,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;
@@ -959,7 +971,7 @@
rth->rt_src = saddr;
#ifdef CONFIG_NET_CLS_ROUTE
rth->u.dst.tclassid = itag;
-@@ -1653,6 +1655,7 @@ static int ip_route_input_mc(struct sk_b
+@@ -1546,6 +1548,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;
@@ -967,7 +979,7 @@
rth->rt_gateway = daddr;
rth->rt_spec_dst= spec_dst;
rth->rt_type = RTN_MULTICAST;
-@@ -1717,7 +1720,7 @@ static inline int __mkroute_input(struct
+@@ -1610,7 +1613,7 @@ static inline int __mkroute_input(struct
struct fib_result* res,
struct in_device *in_dev,
__be32 daddr, __be32 saddr, u32 tos,
@@ -976,7 +988,7 @@
{
struct rtable *rth;
-@@ -1751,6 +1754,7 @@ static inline int __mkroute_input(struct
+@@ -1644,6 +1647,7 @@ static inline int __mkroute_input(struct
flags |= RTCF_DIRECTSRC;
if (out_dev == in_dev && err && !(flags & (RTCF_NAT | RTCF_MASQ)) &&
@@ -984,7 +996,7 @@
(IN_DEV_SHARED_MEDIA(out_dev) ||
inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
flags |= RTCF_DOREDIRECT;
-@@ -1788,6 +1792,7 @@ static inline int __mkroute_input(struct
+@@ -1677,6 +1681,7 @@ static inline int __mkroute_input(struct
rth->fl.mark = skb->mark;
rth->fl.fl4_src = saddr;
rth->rt_src = saddr;
@@ -992,7 +1004,7 @@
rth->rt_gateway = daddr;
rth->rt_iif =
rth->fl.iif = in_dev->dev->ifindex;
-@@ -1795,6 +1800,7 @@ static inline int __mkroute_input(struct
+@@ -1684,6 +1689,7 @@ static inline int __mkroute_input(struct
dev_hold(rth->u.dst.dev);
rth->idev = in_dev_get(rth->u.dst.dev);
rth->fl.oif = 0;
@@ -1000,12 +1012,12 @@
rth->rt_spec_dst= spec_dst;
rth->u.dst.input = ip_forward;
-@@ -1816,19 +1822,20 @@ static inline int ip_mkroute_input_def(s
- struct fib_result* res,
- const struct flowi *fl,
- struct in_device *in_dev,
-- __be32 daddr, __be32 saddr, u32 tos)
-+ __be32 daddr, __be32 saddr, u32 tos, __be32 lsrc)
+@@ -1705,19 +1711,20 @@ static inline int ip_mkroute_input(struc
+ struct fib_result* res,
+ const struct flowi *fl,
+ struct in_device *in_dev,
+- __be32 daddr, __be32 saddr, u32 tos)
++ __be32 daddr, __be32 saddr, u32 tos, __be32 lsrc)
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-desktop-routes.patch?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list