Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78627
b: refs/heads/master
c: 426b530
h: refs/heads/master
i:
  78625: 1d828df
  78623: 21a6a50
v: v3
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Jan 28, 2008
1 parent a546714 commit 86a8ec5
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 62 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: e1af9f270b69a3ad1dcbabb404dd1f40a96f43f5
refs/heads/master: 426b5303eb435d98b9bee37a807be386bc2b3320
10 changes: 7 additions & 3 deletions trunk/include/net/neighbour.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ struct neighbour;

struct neigh_parms
{
struct net *net;
struct net_device *dev;
struct neigh_parms *next;
int (*neigh_setup)(struct neighbour *);
Expand Down Expand Up @@ -126,7 +127,8 @@ struct neigh_ops
struct pneigh_entry
{
struct pneigh_entry *next;
struct net_device *dev;
struct net *net;
struct net_device *dev;
u8 flags;
u8 key[0];
};
Expand Down Expand Up @@ -187,6 +189,7 @@ extern struct neighbour * neigh_lookup(struct neigh_table *tbl,
const void *pkey,
struct net_device *dev);
extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl,
struct net *net,
const void *pkey);
extern struct neighbour * neigh_create(struct neigh_table *tbl,
const void *pkey,
Expand All @@ -211,15 +214,16 @@ extern unsigned long neigh_rand_reach_time(unsigned long base);

extern void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p,
struct sk_buff *skb);
extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, const void *key, struct net_device *dev, int creat);
extern int pneigh_delete(struct neigh_table *tbl, const void *key, struct net_device *dev);
extern struct pneigh_entry *pneigh_lookup(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev, int creat);
extern int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *key, struct net_device *dev);

extern void neigh_app_ns(struct neighbour *n);
extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie);
extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *));
extern void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *));

struct neigh_seq_state {
struct net *net;
struct neigh_table *tbl;
void *(*neigh_sub_iter)(struct neigh_seq_state *state,
struct neighbour *n, loff_t *pos);
Expand Down
15 changes: 14 additions & 1 deletion trunk/net/atm/clip.c
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,11 @@ static int arp_seq_open(struct inode *inode, struct file *file)

seq = file->private_data;
seq->private = state;
state->ns.net = get_proc_net(inode);
if (!state->ns.net) {
seq_release_private(inode, file);
rc = -ENXIO;
}
out:
return rc;

Expand All @@ -957,11 +962,19 @@ static int arp_seq_open(struct inode *inode, struct file *file)
goto out;
}

static int arp_seq_release(struct inode *inode, struct file *file)
{
struct seq_file *seq = file->private_data;
struct clip_seq_state *state = seq->private;
put_net(state->ns.net);
return seq_release_private(inode, file);
}

static const struct file_operations arp_seq_fops = {
.open = arp_seq_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release_private,
.release = arp_seq_release,
.owner = THIS_MODULE
};
#endif
Expand Down
Loading

0 comments on commit 86a8ec5

Please sign in to comment.