aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-04-11 10:27:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-04-11 10:27:24 -0400
commitc44eaf41a5a423993932c9a9ad279ee132779b48 (patch)
tree3554fc0bfdcd97936417d6d001d00710d11e67e5 /net/ipv4/route.c
parent4263a2f1dad8c8e7ce2352a0cbc882c2b0c044a9 (diff)
parent88edaa415966af965bb7eb7056d8b58145462c8e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits) net: Add support for SMSC LAN9530, LAN9730 and LAN89530 mlx4_en: Restoring RX buffer pointer in case of failure mlx4: Sensing link type at device initialization ipv4: Fix "Set rt->rt_iif more sanely on output routes." MAINTAINERS: add entry for Xen network backend be2net: Fix suspend/resume operation be2net: Rename some struct members for clarity pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev dsa/mv88e6131: add support for mv88e6085 switch ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2) be2net: Fix a potential crash during shutdown. bna: Fix for handling firmware heartbeat failure can: mcp251x: Allow pass IRQ flags through platform data. smsc911x: fix mac_lock acquision before calling smsc911x_mac_read iwlwifi: accept EEPROM version 0x423 for iwl6000 rt2x00: fix cancelling uninitialized work rtlwifi: Fix some warnings/bugs p54usb: IDs for two new devices wl12xx: fix potential buffer overflow in testmode nvs push zd1211rw: reset rx idle timer from tasklet ...
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index ea107515c53e..c1acf69858fd 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1891,6 +1891,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
1891#ifdef CONFIG_IP_ROUTE_CLASSID 1891#ifdef CONFIG_IP_ROUTE_CLASSID
1892 rth->dst.tclassid = itag; 1892 rth->dst.tclassid = itag;
1893#endif 1893#endif
1894 rth->rt_route_iif = dev->ifindex;
1894 rth->rt_iif = dev->ifindex; 1895 rth->rt_iif = dev->ifindex;
1895 rth->dst.dev = init_net.loopback_dev; 1896 rth->dst.dev = init_net.loopback_dev;
1896 dev_hold(rth->dst.dev); 1897 dev_hold(rth->dst.dev);
@@ -2026,6 +2027,7 @@ static int __mkroute_input(struct sk_buff *skb,
2026 rth->rt_key_src = saddr; 2027 rth->rt_key_src = saddr;
2027 rth->rt_src = saddr; 2028 rth->rt_src = saddr;
2028 rth->rt_gateway = daddr; 2029 rth->rt_gateway = daddr;
2030 rth->rt_route_iif = in_dev->dev->ifindex;
2029 rth->rt_iif = in_dev->dev->ifindex; 2031 rth->rt_iif = in_dev->dev->ifindex;
2030 rth->dst.dev = (out_dev)->dev; 2032 rth->dst.dev = (out_dev)->dev;
2031 dev_hold(rth->dst.dev); 2033 dev_hold(rth->dst.dev);
@@ -2202,6 +2204,7 @@ local_input:
2202#ifdef CONFIG_IP_ROUTE_CLASSID 2204#ifdef CONFIG_IP_ROUTE_CLASSID
2203 rth->dst.tclassid = itag; 2205 rth->dst.tclassid = itag;
2204#endif 2206#endif
2207 rth->rt_route_iif = dev->ifindex;
2205 rth->rt_iif = dev->ifindex; 2208 rth->rt_iif = dev->ifindex;
2206 rth->dst.dev = net->loopback_dev; 2209 rth->dst.dev = net->loopback_dev;
2207 dev_hold(rth->dst.dev); 2210 dev_hold(rth->dst.dev);
@@ -2401,7 +2404,8 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
2401 rth->rt_mark = oldflp4->flowi4_mark; 2404 rth->rt_mark = oldflp4->flowi4_mark;
2402 rth->rt_dst = fl4->daddr; 2405 rth->rt_dst = fl4->daddr;
2403 rth->rt_src = fl4->saddr; 2406 rth->rt_src = fl4->saddr;
2404 rth->rt_iif = 0; 2407 rth->rt_route_iif = 0;
2408 rth->rt_iif = oldflp4->flowi4_oif ? : dev_out->ifindex;
2405 /* get references to the devices that are to be hold by the routing 2409 /* get references to the devices that are to be hold by the routing
2406 cache entry */ 2410 cache entry */
2407 rth->dst.dev = dev_out; 2411 rth->dst.dev = dev_out;
@@ -2716,6 +2720,7 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
2716 rt->rt_key_dst = ort->rt_key_dst; 2720 rt->rt_key_dst = ort->rt_key_dst;
2717 rt->rt_key_src = ort->rt_key_src; 2721 rt->rt_key_src = ort->rt_key_src;
2718 rt->rt_tos = ort->rt_tos; 2722 rt->rt_tos = ort->rt_tos;
2723 rt->rt_route_iif = ort->rt_route_iif;
2719 rt->rt_iif = ort->rt_iif; 2724 rt->rt_iif = ort->rt_iif;
2720 rt->rt_oif = ort->rt_oif; 2725 rt->rt_oif = ort->rt_oif;
2721 rt->rt_mark = ort->rt_mark; 2726 rt->rt_mark = ort->rt_mark;
@@ -2725,7 +2730,6 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
2725 rt->rt_type = ort->rt_type; 2730 rt->rt_type = ort->rt_type;
2726 rt->rt_dst = ort->rt_dst; 2731 rt->rt_dst = ort->rt_dst;
2727 rt->rt_src = ort->rt_src; 2732 rt->rt_src = ort->rt_src;
2728 rt->rt_iif = ort->rt_iif;
2729 rt->rt_gateway = ort->rt_gateway; 2733 rt->rt_gateway = ort->rt_gateway;
2730 rt->rt_spec_dst = ort->rt_spec_dst; 2734 rt->rt_spec_dst = ort->rt_spec_dst;
2731 rt->peer = ort->peer; 2735 rt->peer = ort->peer;