aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorEric Biederman <ebiederm@aristanetworks.com>2009-03-04 03:03:08 -0500
committerDavid S. Miller <davem@davemloft.net>2009-03-04 03:03:08 -0500
commit0c5c2d3089068d4aa378f7a40d2b5ad9d4f52ce8 (patch)
tree8c7e6c54410e5730f26ea4bc634ae5c1ef47da8b /net/core
parentfc1f9ea51de726b3b8003539788d918814c9deff (diff)
neigh: Allow for user space users of the neighbour table
Currently it is possible to do just about everything with the arp table from user space except treat an entry like you are using it. To that end implement and a flag NTF_USE that when set in a netwlink update request treats the neighbour table entry like the kernel does on the output path. This allows user space applications to share the kernel's arp cache. Signed-off-by: Eric Biederman <ebiederm@aristanetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/neighbour.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 417b6d739fb7..a1cbce7fdae5 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1654,7 +1654,11 @@ static int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
1654 flags &= ~NEIGH_UPDATE_F_OVERRIDE; 1654 flags &= ~NEIGH_UPDATE_F_OVERRIDE;
1655 } 1655 }
1656 1656
1657 err = neigh_update(neigh, lladdr, ndm->ndm_state, flags); 1657 if (ndm->ndm_flags & NTF_USE) {
1658 neigh_event_send(neigh, NULL);
1659 err = 0;
1660 } else
1661 err = neigh_update(neigh, lladdr, ndm->ndm_state, flags);
1658 neigh_release(neigh); 1662 neigh_release(neigh);
1659 goto out_dev_put; 1663 goto out_dev_put;
1660 } 1664 }