diff options
-rw-r--r-- | include/net/ip_fib.h | 1 | ||||
-rw-r--r-- | net/ipv4/fib_semantics.c | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 0e140830b85a..3f6c943faedc 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -51,6 +51,7 @@ struct fib_nh { | |||
51 | struct fib_info *nh_parent; | 51 | struct fib_info *nh_parent; |
52 | unsigned nh_flags; | 52 | unsigned nh_flags; |
53 | unsigned char nh_scope; | 53 | unsigned char nh_scope; |
54 | unsigned char nh_cfg_scope; | ||
54 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 55 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
55 | int nh_weight; | 56 | int nh_weight; |
56 | int nh_power; | 57 | int nh_power; |
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index 952c737f2a27..d73d7581b51f 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) | |||
854 | } | 854 | } |
855 | 855 | ||
856 | change_nexthops(fi) { | 856 | change_nexthops(fi) { |
857 | nexthop_nh->nh_cfg_scope = cfg->fc_scope; | ||
857 | nexthop_nh->nh_saddr = inet_select_addr(nexthop_nh->nh_dev, | 858 | nexthop_nh->nh_saddr = inet_select_addr(nexthop_nh->nh_dev, |
858 | nexthop_nh->nh_gw, | 859 | nexthop_nh->nh_gw, |
859 | nexthop_nh->nh_scope); | 860 | nexthop_nh->nh_cfg_scope); |
860 | } endfor_nexthops(fi) | 861 | } endfor_nexthops(fi) |
861 | 862 | ||
862 | link_it: | 863 | link_it: |
@@ -1141,7 +1142,7 @@ void fib_update_nh_saddrs(struct net_device *dev) | |||
1141 | continue; | 1142 | continue; |
1142 | nh->nh_saddr = inet_select_addr(nh->nh_dev, | 1143 | nh->nh_saddr = inet_select_addr(nh->nh_dev, |
1143 | nh->nh_gw, | 1144 | nh->nh_gw, |
1144 | nh->nh_scope); | 1145 | nh->nh_cfg_scope); |
1145 | } | 1146 | } |
1146 | } | 1147 | } |
1147 | 1148 | ||