aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2011-12-02 11:52:08 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-05 15:20:19 -0500
commit2721745501a26d0dc3b88c0d2f3aa11471891388 (patch)
treee9c09622b11ad7d9317b4b01824374a852867c28 /net/ipv6
parent761965eab38d2cbc59c36e355c59609e3a04705a (diff)
net: Rename dst_get_neighbour{, _raw} to dst_get_neighbour_noref{, _raw}.
To reflect the fact that a refrence is not obtained to the resulting neighbour entry. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/addrconf.c2
-rw-r--r--net/ipv6/ip6_fib.c2
-rw-r--r--net/ipv6/ip6_output.c6
-rw-r--r--net/ipv6/ndisc.c4
-rw-r--r--net/ipv6/route.c16
-rw-r--r--net/ipv6/sit.c4
6 files changed, 17 insertions, 17 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 586051726341..058cc222b3f1 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -657,7 +657,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen,
657 * layer address of our nexhop router 657 * layer address of our nexhop router
658 */ 658 */
659 659
660 if (dst_get_neighbour_raw(&rt->dst) == NULL) 660 if (dst_get_neighbour_noref_raw(&rt->dst) == NULL)
661 ifa->flags &= ~IFA_F_OPTIMISTIC; 661 ifa->flags &= ~IFA_F_OPTIMISTIC;
662 662
663 ifa->idev = idev; 663 ifa->idev = idev;
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 7b4730315d09..278363123657 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1533,7 +1533,7 @@ static int fib6_age(struct rt6_info *rt, void *arg)
1533 RT6_TRACE("aging clone %p\n", rt); 1533 RT6_TRACE("aging clone %p\n", rt);
1534 return -1; 1534 return -1;
1535 } else if ((rt->rt6i_flags & RTF_GATEWAY) && 1535 } else if ((rt->rt6i_flags & RTF_GATEWAY) &&
1536 (!(dst_get_neighbour_raw(&rt->dst)->flags & NTF_ROUTER))) { 1536 (!(dst_get_neighbour_noref_raw(&rt->dst)->flags & NTF_ROUTER))) {
1537 RT6_TRACE("purging route %p via non-router but gateway\n", 1537 RT6_TRACE("purging route %p via non-router but gateway\n",
1538 rt); 1538 rt);
1539 return -1; 1539 return -1;
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 3221bc675654..71d26999c955 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -136,7 +136,7 @@ static int ip6_finish_output2(struct sk_buff *skb)
136 } 136 }
137 137
138 rcu_read_lock(); 138 rcu_read_lock();
139 neigh = dst_get_neighbour(dst); 139 neigh = dst_get_neighbour_noref(dst);
140 if (neigh) { 140 if (neigh) {
141 int res = neigh_output(neigh, skb); 141 int res = neigh_output(neigh, skb);
142 142
@@ -463,7 +463,7 @@ int ip6_forward(struct sk_buff *skb)
463 send redirects to source routed frames. 463 send redirects to source routed frames.
464 We don't send redirects to frames decapsulated from IPsec. 464 We don't send redirects to frames decapsulated from IPsec.
465 */ 465 */
466 n = dst_get_neighbour(dst); 466 n = dst_get_neighbour_noref(dst);
467 if (skb->dev == dst->dev && n && opt->srcrt == 0 && !skb_sec_path(skb)) { 467 if (skb->dev == dst->dev && n && opt->srcrt == 0 && !skb_sec_path(skb)) {
468 struct in6_addr *target = NULL; 468 struct in6_addr *target = NULL;
469 struct rt6_info *rt; 469 struct rt6_info *rt;
@@ -983,7 +983,7 @@ static int ip6_dst_lookup_tail(struct sock *sk,
983 * dst entry of the nexthop router 983 * dst entry of the nexthop router
984 */ 984 */
985 rcu_read_lock(); 985 rcu_read_lock();
986 n = dst_get_neighbour(*dst); 986 n = dst_get_neighbour_noref(*dst);
987 if (n && !(n->nud_state & NUD_VALID)) { 987 if (n && !(n->nud_state & NUD_VALID)) {
988 struct inet6_ifaddr *ifp; 988 struct inet6_ifaddr *ifp;
989 struct flowi6 fl_gw6; 989 struct flowi6 fl_gw6;
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index cfb9709ac7c9..e72c8af85781 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1238,7 +1238,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
1238 rt = rt6_get_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev); 1238 rt = rt6_get_dflt_router(&ipv6_hdr(skb)->saddr, skb->dev);
1239 1239
1240 if (rt) 1240 if (rt)
1241 neigh = dst_get_neighbour(&rt->dst); 1241 neigh = dst_get_neighbour_noref(&rt->dst);
1242 1242
1243 if (rt && lifetime == 0) { 1243 if (rt && lifetime == 0) {
1244 neigh_clone(neigh); 1244 neigh_clone(neigh);
@@ -1258,7 +1258,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
1258 return; 1258 return;
1259 } 1259 }
1260 1260
1261 neigh = dst_get_neighbour(&rt->dst); 1261 neigh = dst_get_neighbour_noref(&rt->dst);
1262 if (neigh == NULL) { 1262 if (neigh == NULL) {
1263 ND_PRINTK0(KERN_ERR 1263 ND_PRINTK0(KERN_ERR
1264 "ICMPv6 RA: %s() got default router without neighbour.\n", 1264 "ICMPv6 RA: %s() got default router without neighbour.\n",
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 1138b0a5566d..09412baf1ca6 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -385,7 +385,7 @@ static void rt6_probe(struct rt6_info *rt)
385 * to no more than one per minute. 385 * to no more than one per minute.
386 */ 386 */
387 rcu_read_lock(); 387 rcu_read_lock();
388 neigh = rt ? dst_get_neighbour(&rt->dst) : NULL; 388 neigh = rt ? dst_get_neighbour_noref(&rt->dst) : NULL;
389 if (!neigh || (neigh->nud_state & NUD_VALID)) 389 if (!neigh || (neigh->nud_state & NUD_VALID))
390 goto out; 390 goto out;
391 read_lock_bh(&neigh->lock); 391 read_lock_bh(&neigh->lock);
@@ -432,7 +432,7 @@ static inline int rt6_check_neigh(struct rt6_info *rt)
432 int m; 432 int m;
433 433
434 rcu_read_lock(); 434 rcu_read_lock();
435 neigh = dst_get_neighbour(&rt->dst); 435 neigh = dst_get_neighbour_noref(&rt->dst);
436 if (rt->rt6i_flags & RTF_NONEXTHOP || 436 if (rt->rt6i_flags & RTF_NONEXTHOP ||
437 !(rt->rt6i_flags & RTF_GATEWAY)) 437 !(rt->rt6i_flags & RTF_GATEWAY))
438 m = 1; 438 m = 1;
@@ -786,7 +786,7 @@ static struct rt6_info *rt6_alloc_clone(struct rt6_info *ort,
786 786
787 if (rt) { 787 if (rt) {
788 rt->rt6i_flags |= RTF_CACHE; 788 rt->rt6i_flags |= RTF_CACHE;
789 dst_set_neighbour(&rt->dst, neigh_clone(dst_get_neighbour_raw(&ort->dst))); 789 dst_set_neighbour(&rt->dst, neigh_clone(dst_get_neighbour_noref_raw(&ort->dst)));
790 } 790 }
791 return rt; 791 return rt;
792} 792}
@@ -820,7 +820,7 @@ restart:
820 dst_hold(&rt->dst); 820 dst_hold(&rt->dst);
821 read_unlock_bh(&table->tb6_lock); 821 read_unlock_bh(&table->tb6_lock);
822 822
823 if (!dst_get_neighbour_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) 823 if (!dst_get_neighbour_noref_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP))
824 nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr); 824 nrt = rt6_alloc_cow(rt, &fl6->daddr, &fl6->saddr);
825 else if (!(rt->dst.flags & DST_HOST)) 825 else if (!(rt->dst.flags & DST_HOST))
826 nrt = rt6_alloc_clone(rt, &fl6->daddr); 826 nrt = rt6_alloc_clone(rt, &fl6->daddr);
@@ -1629,7 +1629,7 @@ void rt6_redirect(const struct in6_addr *dest, const struct in6_addr *src,
1629 dst_confirm(&rt->dst); 1629 dst_confirm(&rt->dst);
1630 1630
1631 /* Duplicate redirect: silently ignore. */ 1631 /* Duplicate redirect: silently ignore. */
1632 if (neigh == dst_get_neighbour_raw(&rt->dst)) 1632 if (neigh == dst_get_neighbour_noref_raw(&rt->dst))
1633 goto out; 1633 goto out;
1634 1634
1635 nrt = ip6_rt_copy(rt, dest); 1635 nrt = ip6_rt_copy(rt, dest);
@@ -1721,7 +1721,7 @@ again:
1721 1. It is connected route. Action: COW 1721 1. It is connected route. Action: COW
1722 2. It is gatewayed route or NONEXTHOP route. Action: clone it. 1722 2. It is gatewayed route or NONEXTHOP route. Action: clone it.
1723 */ 1723 */
1724 if (!dst_get_neighbour_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP)) 1724 if (!dst_get_neighbour_noref_raw(&rt->dst) && !(rt->rt6i_flags & RTF_NONEXTHOP))
1725 nrt = rt6_alloc_cow(rt, daddr, saddr); 1725 nrt = rt6_alloc_cow(rt, daddr, saddr);
1726 else 1726 else
1727 nrt = rt6_alloc_clone(rt, daddr); 1727 nrt = rt6_alloc_clone(rt, daddr);
@@ -2456,7 +2456,7 @@ static int rt6_fill_node(struct net *net,
2456 goto nla_put_failure; 2456 goto nla_put_failure;
2457 2457
2458 rcu_read_lock(); 2458 rcu_read_lock();
2459 n = dst_get_neighbour(&rt->dst); 2459 n = dst_get_neighbour_noref(&rt->dst);
2460 if (n) 2460 if (n)
2461 NLA_PUT(skb, RTA_GATEWAY, 16, &n->primary_key); 2461 NLA_PUT(skb, RTA_GATEWAY, 16, &n->primary_key);
2462 rcu_read_unlock(); 2462 rcu_read_unlock();
@@ -2653,7 +2653,7 @@ static int rt6_info_route(struct rt6_info *rt, void *p_arg)
2653 seq_puts(m, "00000000000000000000000000000000 00 "); 2653 seq_puts(m, "00000000000000000000000000000000 00 ");
2654#endif 2654#endif
2655 rcu_read_lock(); 2655 rcu_read_lock();
2656 n = dst_get_neighbour(&rt->dst); 2656 n = dst_get_neighbour_noref(&rt->dst);
2657 if (n) { 2657 if (n) {
2658 seq_printf(m, "%pi6", n->primary_key); 2658 seq_printf(m, "%pi6", n->primary_key);
2659 } else { 2659 } else {
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 50968f226e75..b7d14cc12ee8 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -680,7 +680,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
680 struct neighbour *neigh = NULL; 680 struct neighbour *neigh = NULL;
681 681
682 if (skb_dst(skb)) 682 if (skb_dst(skb))
683 neigh = dst_get_neighbour(skb_dst(skb)); 683 neigh = dst_get_neighbour_noref(skb_dst(skb));
684 684
685 if (neigh == NULL) { 685 if (neigh == NULL) {
686 if (net_ratelimit()) 686 if (net_ratelimit())
@@ -705,7 +705,7 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb,
705 struct neighbour *neigh = NULL; 705 struct neighbour *neigh = NULL;
706 706
707 if (skb_dst(skb)) 707 if (skb_dst(skb))
708 neigh = dst_get_neighbour(skb_dst(skb)); 708 neigh = dst_get_neighbour_noref(skb_dst(skb));
709 709
710 if (neigh == NULL) { 710 if (neigh == NULL) {
711 if (net_ratelimit()) 711 if (net_ratelimit())