summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-08 11:03:21 -0800
committerDavid S. Miller <davem@davemloft.net>2011-03-08 11:03:21 -0800
commita7ac8fc1d8d26c975c460a69aa7b9d5b5d5d29b0 (patch)
treed7487dfcbe87a8e57ce666d9febd1199e46c7b46 /net
parent1fc050a13473348f5c439de2bb41c8e92dba5588 (diff)
downloadop-kernel-dev-a7ac8fc1d8d26c975c460a69aa7b9d5b5d5d29b0.zip
op-kernel-dev-a7ac8fc1d8d26c975c460a69aa7b9d5b5d5d29b0.tar.gz
ipv4: Fix scope value used in route src-address caching.
We have to use cfg->fc_scope not the final nh_scope value. Reported-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/fib_semantics.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 952c737..d73d758 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -854,9 +854,10 @@ struct fib_info *fib_create_info(struct fib_config *cfg)
}
change_nexthops(fi) {
+ nexthop_nh->nh_cfg_scope = cfg->fc_scope;
nexthop_nh->nh_saddr = inet_select_addr(nexthop_nh->nh_dev,
nexthop_nh->nh_gw,
- nexthop_nh->nh_scope);
+ nexthop_nh->nh_cfg_scope);
} endfor_nexthops(fi)
link_it:
@@ -1141,7 +1142,7 @@ void fib_update_nh_saddrs(struct net_device *dev)
continue;
nh->nh_saddr = inet_select_addr(nh->nh_dev,
nh->nh_gw,
- nh->nh_scope);
+ nh->nh_cfg_scope);
}
}
OpenPOWER on IntegriCloud