Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322439
b: refs/heads/master
c: acbb219
h: refs/heads/master
i:
  322437: 695a11e
  322435: afbd923
  322431: 737755d
v: v3
  • Loading branch information
Francesco Ruggeri authored and David S. Miller committed Aug 30, 2012
1 parent 379d533 commit 8bff252
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 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: d821a4c4d11ad160925dab2bb009b8444beff484
refs/heads/master: acbb219d5f53821b2d0080d047800410c0420ea1
14 changes: 12 additions & 2 deletions trunk/net/ipv4/ipmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,16 @@ static DEFINE_SPINLOCK(mfc_unres_lock);
static struct kmem_cache *mrt_cachep __read_mostly;

static struct mr_table *ipmr_new_table(struct net *net, u32 id);
static void ipmr_free_table(struct mr_table *mrt);

static int ip_mr_forward(struct net *net, struct mr_table *mrt,
struct sk_buff *skb, struct mfc_cache *cache,
int local);
static int ipmr_cache_report(struct mr_table *mrt,
struct sk_buff *pkt, vifi_t vifi, int assert);
static int __ipmr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb,
struct mfc_cache *c, struct rtmsg *rtm);
static void mroute_clean_tables(struct mr_table *mrt);
static void ipmr_expire_process(unsigned long arg);

#ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES
Expand Down Expand Up @@ -271,7 +274,7 @@ static void __net_exit ipmr_rules_exit(struct net *net)

list_for_each_entry_safe(mrt, next, &net->ipv4.mr_tables, list) {
list_del(&mrt->list);
kfree(mrt);
ipmr_free_table(mrt);
}
fib_rules_unregister(net->ipv4.mr_rules_ops);
}
Expand Down Expand Up @@ -299,7 +302,7 @@ static int __net_init ipmr_rules_init(struct net *net)

static void __net_exit ipmr_rules_exit(struct net *net)
{
kfree(net->ipv4.mrt);
ipmr_free_table(net->ipv4.mrt);
}
#endif

Expand Down Expand Up @@ -336,6 +339,13 @@ static struct mr_table *ipmr_new_table(struct net *net, u32 id)
return mrt;
}

static void ipmr_free_table(struct mr_table *mrt)
{
del_timer_sync(&mrt->ipmr_expire_timer);
mroute_clean_tables(mrt);
kfree(mrt);
}

/* Service routines creating virtual interfaces: DVMRP tunnels and PIMREG */

static void ipmr_del_tunnel(struct net_device *dev, struct vifctl *v)
Expand Down

0 comments on commit 8bff252

Please sign in to comment.