]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/infiniband/core/addr.c
net: Abstract dst->neighbour accesses behind helpers.
[karo-tx-linux.git] / drivers / infiniband / core / addr.c
index 8e21d457b899de74d2e60896a907f1e54eb75195..236ad9a89c0a403a7cf3a65e17fbbffe1ef14919 100644 (file)
@@ -215,7 +215,7 @@ static int addr4_resolve(struct sockaddr_in *src_in,
 
        neigh = neigh_lookup(&arp_tbl, &rt->rt_gateway, rt->dst.dev);
        if (!neigh || !(neigh->nud_state & NUD_VALID)) {
-               neigh_event_send(rt->dst.neighbour, NULL);
+               neigh_event_send(dst_get_neighbour(&rt->dst), NULL);
                ret = -ENODATA;
                if (neigh)
                        goto release;
@@ -273,9 +273,10 @@ static int addr6_resolve(struct sockaddr_in6 *src_in,
                goto put;
        }
 
-       neigh = dst->neighbour;
+       neigh = dst_get_neighbour(dst);
        if (!neigh || !(neigh->nud_state & NUD_VALID)) {
-               neigh_event_send(dst->neighbour, NULL);
+               if (neigh)
+                       neigh_event_send(neigh, NULL);
                ret = -ENODATA;
                goto put;
        }