Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66249
b: refs/heads/master
c: d961db3
h: refs/heads/master
i:
  66247: 456be03
v: v3
  • Loading branch information
Thomas Graf authored and David S. Miller committed Oct 10, 2007
1 parent 20a1030 commit 4ce1843
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f494554f9b95d0de57c14c460d525e3715e3f6f
refs/heads/master: d961db358f41033a8fc7b62948bc7cff1b4bb1fe
33 changes: 13 additions & 20 deletions trunk/net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@
#define PNEIGH_HASHMASK 0xF

static void neigh_timer_handler(unsigned long arg);
#ifdef CONFIG_ARPD
static void neigh_app_notify(struct neighbour *n);
#endif
static void __neigh_notify(struct neighbour *n, int type, int flags);
static void neigh_update_notify(struct neighbour *neigh);
static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);

Expand Down Expand Up @@ -110,6 +109,7 @@ static void neigh_cleanup_and_release(struct neighbour *neigh)
if (neigh->parms->neigh_cleanup)
neigh->parms->neigh_cleanup(neigh);

__neigh_notify(neigh, RTM_DELNEIGH, 0);
neigh_release(neigh);
}

Expand Down Expand Up @@ -830,13 +830,10 @@ static void neigh_timer_handler(unsigned long arg)
out:
write_unlock(&neigh->lock);
}

if (notify)
call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh);
neigh_update_notify(neigh);

#ifdef CONFIG_ARPD
if (notify && neigh->parms->app_probes)
neigh_app_notify(neigh);
#endif
neigh_release(neigh);
}

Expand Down Expand Up @@ -1065,11 +1062,8 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
write_unlock_bh(&neigh->lock);

if (notify)
call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh);
#ifdef CONFIG_ARPD
if (notify && neigh->parms->app_probes)
neigh_app_notify(neigh);
#endif
neigh_update_notify(neigh);

return err;
}

Expand Down Expand Up @@ -2002,6 +1996,11 @@ static int neigh_fill_info(struct sk_buff *skb, struct neighbour *neigh,
return -EMSGSIZE;
}

static void neigh_update_notify(struct neighbour *neigh)
{
call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh);
__neigh_notify(neigh, RTM_NEWNEIGH, 0);
}

static int neigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
struct netlink_callback *cb)
Expand Down Expand Up @@ -2421,7 +2420,6 @@ static const struct file_operations neigh_stat_seq_fops = {

#endif /* CONFIG_PROC_FS */

#ifdef CONFIG_ARPD
static inline size_t neigh_nlmsg_size(void)
{
return NLMSG_ALIGN(sizeof(struct ndmsg))
Expand Down Expand Up @@ -2453,16 +2451,11 @@ static void __neigh_notify(struct neighbour *n, int type, int flags)
rtnl_set_sk_err(RTNLGRP_NEIGH, err);
}

#ifdef CONFIG_ARPD
void neigh_app_ns(struct neighbour *n)
{
__neigh_notify(n, RTM_GETNEIGH, NLM_F_REQUEST);
}

static void neigh_app_notify(struct neighbour *n)
{
__neigh_notify(n, RTM_NEWNEIGH, 0);
}

#endif /* CONFIG_ARPD */

#ifdef CONFIG_SYSCTL
Expand Down

0 comments on commit 4ce1843

Please sign in to comment.