@@ -356,7 +356,7 @@ static inline struct rt6_info *rt6_device_match(struct net *net,
356356#ifdef CONFIG_IPV6_ROUTER_PREF
357357static void rt6_probe (struct rt6_info * rt )
358358{
359- struct neighbour * neigh = rt ? rt -> rt6i_nexthop : NULL ;
359+ struct neighbour * neigh = rt ? rt -> dst . neighbour : NULL ;
360360 /*
361361 * Okay, this does not seem to be appropriate
362362 * for now, however, we need to check if it
@@ -404,7 +404,7 @@ static inline int rt6_check_dev(struct rt6_info *rt, int oif)
404404
405405static inline int rt6_check_neigh (struct rt6_info * rt )
406406{
407- struct neighbour * neigh = rt -> rt6i_nexthop ;
407+ struct neighbour * neigh = rt -> dst . neighbour ;
408408 int m ;
409409 if (rt -> rt6i_flags & RTF_NONEXTHOP ||
410410 !(rt -> rt6i_flags & RTF_GATEWAY ))
@@ -745,7 +745,7 @@ static struct rt6_info *rt6_alloc_cow(struct rt6_info *ort, const struct in6_add
745745 dst_free (& rt -> dst );
746746 return NULL ;
747747 }
748- rt -> rt6i_nexthop = neigh ;
748+ rt -> dst . neighbour = neigh ;
749749
750750 }
751751
@@ -760,7 +760,7 @@ static struct rt6_info *rt6_alloc_clone(struct rt6_info *ort, const struct in6_a
760760 rt -> rt6i_dst .plen = 128 ;
761761 rt -> rt6i_flags |= RTF_CACHE ;
762762 rt -> dst .flags |= DST_HOST ;
763- rt -> rt6i_nexthop = neigh_clone (ort -> rt6i_nexthop );
763+ rt -> dst . neighbour = neigh_clone (ort -> dst . neighbour );
764764 }
765765 return rt ;
766766}
@@ -794,7 +794,7 @@ static struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
794794 dst_hold (& rt -> dst );
795795 read_unlock_bh (& table -> tb6_lock );
796796
797- if (!rt -> rt6i_nexthop && !(rt -> rt6i_flags & RTF_NONEXTHOP ))
797+ if (!rt -> dst . neighbour && !(rt -> rt6i_flags & RTF_NONEXTHOP ))
798798 nrt = rt6_alloc_cow (rt , & fl6 -> daddr , & fl6 -> saddr );
799799 else if (!(rt -> dst .flags & DST_HOST ))
800800 nrt = rt6_alloc_clone (rt , & fl6 -> daddr );
@@ -1058,7 +1058,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
10581058 }
10591059
10601060 rt -> rt6i_idev = idev ;
1061- rt -> rt6i_nexthop = neigh ;
1061+ rt -> dst . neighbour = neigh ;
10621062 atomic_set (& rt -> dst .__refcnt , 1 );
10631063 dst_metric_set (& rt -> dst , RTAX_HOPLIMIT , 255 );
10641064 rt -> dst .output = ip6_output ;
@@ -1338,10 +1338,10 @@ int ip6_route_add(struct fib6_config *cfg)
13381338 rt -> rt6i_prefsrc .plen = 0 ;
13391339
13401340 if (cfg -> fc_flags & (RTF_GATEWAY | RTF_NONEXTHOP )) {
1341- rt -> rt6i_nexthop = __neigh_lookup_errno (& nd_tbl , & rt -> rt6i_gateway , dev );
1342- if (IS_ERR (rt -> rt6i_nexthop )) {
1343- err = PTR_ERR (rt -> rt6i_nexthop );
1344- rt -> rt6i_nexthop = NULL ;
1341+ rt -> dst . neighbour = __neigh_lookup_errno (& nd_tbl , & rt -> rt6i_gateway , dev );
1342+ if (IS_ERR (rt -> dst . neighbour )) {
1343+ err = PTR_ERR (rt -> dst . neighbour );
1344+ rt -> dst . neighbour = NULL ;
13451345 goto out ;
13461346 }
13471347 }
@@ -1590,7 +1590,7 @@ void rt6_redirect(const struct in6_addr *dest, const struct in6_addr *src,
15901590 nrt -> dst .flags |= DST_HOST ;
15911591
15921592 ipv6_addr_copy (& nrt -> rt6i_gateway , (struct in6_addr * )neigh -> primary_key );
1593- nrt -> rt6i_nexthop = neigh_clone (neigh );
1593+ nrt -> dst . neighbour = neigh_clone (neigh );
15941594
15951595 if (ip6_ins_rt (nrt ))
15961596 goto out ;
@@ -1670,7 +1670,7 @@ static void rt6_do_pmtu_disc(const struct in6_addr *daddr, const struct in6_addr
16701670 1. It is connected route. Action: COW
16711671 2. It is gatewayed route or NONEXTHOP route. Action: clone it.
16721672 */
1673- if (!rt -> rt6i_nexthop && !(rt -> rt6i_flags & RTF_NONEXTHOP ))
1673+ if (!rt -> dst . neighbour && !(rt -> rt6i_flags & RTF_NONEXTHOP ))
16741674 nrt = rt6_alloc_cow (rt , daddr , saddr );
16751675 else
16761676 nrt = rt6_alloc_clone (rt , daddr );
@@ -2035,7 +2035,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
20352035
20362036 return ERR_CAST (neigh );
20372037 }
2038- rt -> rt6i_nexthop = neigh ;
2038+ rt -> dst . neighbour = neigh ;
20392039
20402040 ipv6_addr_copy (& rt -> rt6i_dst .addr , addr );
20412041 rt -> rt6i_dst .plen = 128 ;
@@ -2594,8 +2594,8 @@ static int rt6_info_route(struct rt6_info *rt, void *p_arg)
25942594 seq_puts (m , "00000000000000000000000000000000 00 " );
25952595#endif
25962596
2597- if (rt -> rt6i_nexthop ) {
2598- seq_printf (m , "%pi6" , rt -> rt6i_nexthop -> primary_key );
2597+ if (rt -> dst . neighbour ) {
2598+ seq_printf (m , "%pi6" , rt -> dst . neighbour -> primary_key );
25992599 } else {
26002600 seq_puts (m , "00000000000000000000000000000000" );
26012601 }
0 commit comments