summaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-01-04 11:57:25 -0800
committerDavid S. Miller <davem@davemloft.net>2011-01-04 11:57:25 -0800
commitdbbe68bb12b34f3e450da7a73c20e6fa1f85d63a (patch)
tree10f8363cbf5e428c0cb5614959e37b67a7e0cfa2 /net/ipv4
parent7b26e5ebd8b27b0126a84ae7f9a42aa8293d6c48 (diff)
parent9fc3bbb4a752f108cf096d96640f3b548bbbce6c (diff)
downloadtalos-op-linux-dbbe68bb12b34f3e450da7a73c20e6fa1f85d63a.tar.gz
talos-op-linux-dbbe68bb12b34f3e450da7a73c20e6fa1f85d63a.zip
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ipv4')
-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 f1defb7d88e8..351dc4e85242 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2626,8 +2626,12 @@ static int ip_route_output_slow(struct net *net, struct rtable **rp,
}
if (res.type == RTN_LOCAL) {
- if (!fl.fl4_src)
- fl.fl4_src = fl.fl4_dst;
+ if (!fl.fl4_src) {
+ if (res.fi->fib_prefsrc)
+ fl.fl4_src = res.fi->fib_prefsrc;
+ else
+ fl.fl4_src = fl.fl4_dst;
+ }
dev_out = net->loopback_dev;
fl.oif = dev_out->ifindex;
res.fi = NULL;
OpenPOWER on IntegriCloud