Commit 1e904efe authored by David S. Miller's avatar David S. Miller Committed by Linus Torvalds

[IGMP]: Do nothing in ip_mc_down() if ip_mc_up() was not called previously.

parent dde1ec5b
......@@ -36,6 +36,8 @@ struct in_device
rwlock_t lock;
int dead;
struct in_ifaddr *ifa_list; /* IP ifaddr chain */
int mc_initted;
struct ip_mc_list *mc_list; /* IP multicast filter chain */
rwlock_t mc_lock; /* for mc_tomb */
struct ip_mc_list *mc_tomb;
......
......@@ -1217,6 +1217,9 @@ void ip_mc_down(struct in_device *in_dev)
ASSERT_RTNL();
if (!in_dev->mc_initted)
return;
#ifdef CONFIG_IP_MULTICAST
in_dev->mr_ifc_count = 0;
if (del_timer(&in_dev->mr_ifc_timer))
......@@ -1262,6 +1265,8 @@ void ip_mc_up(struct in_device *in_dev)
for (i=in_dev->mc_list; i; i=i->next)
igmp_group_added(i);
in_dev->mc_initted = 1;
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment