diff options
| -rw-r--r-- | net/bridge/br_multicast.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 12ce1eaa4f3e..fd96a8dc97f4 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
| @@ -823,6 +823,7 @@ static int br_multicast_query(struct net_bridge *br, | |||
| 823 | unsigned long max_delay; | 823 | unsigned long max_delay; |
| 824 | unsigned long now = jiffies; | 824 | unsigned long now = jiffies; |
| 825 | __be32 group; | 825 | __be32 group; |
| 826 | int err = 0; | ||
| 826 | 827 | ||
| 827 | spin_lock(&br->multicast_lock); | 828 | spin_lock(&br->multicast_lock); |
| 828 | if (!netif_running(br->dev) || | 829 | if (!netif_running(br->dev) || |
| @@ -841,12 +842,14 @@ static int br_multicast_query(struct net_bridge *br, | |||
| 841 | group = 0; | 842 | group = 0; |
| 842 | } | 843 | } |
| 843 | } else { | 844 | } else { |
| 844 | if (!pskb_may_pull(skb, sizeof(struct igmpv3_query))) | 845 | if (!pskb_may_pull(skb, sizeof(struct igmpv3_query))) { |
| 845 | return -EINVAL; | 846 | err = -EINVAL; |
| 847 | goto out; | ||
| 848 | } | ||
| 846 | 849 | ||
| 847 | ih3 = igmpv3_query_hdr(skb); | 850 | ih3 = igmpv3_query_hdr(skb); |
| 848 | if (ih3->nsrcs) | 851 | if (ih3->nsrcs) |
| 849 | return 0; | 852 | goto out; |
| 850 | 853 | ||
| 851 | max_delay = ih3->code ? 1 : | 854 | max_delay = ih3->code ? 1 : |
| 852 | IGMPV3_MRC(ih3->code) * (HZ / IGMP_TIMER_SCALE); | 855 | IGMPV3_MRC(ih3->code) * (HZ / IGMP_TIMER_SCALE); |
| @@ -876,7 +879,7 @@ static int br_multicast_query(struct net_bridge *br, | |||
| 876 | 879 | ||
| 877 | out: | 880 | out: |
| 878 | spin_unlock(&br->multicast_lock); | 881 | spin_unlock(&br->multicast_lock); |
| 879 | return 0; | 882 | return err; |
| 880 | } | 883 | } |
| 881 | 884 | ||
| 882 | static void br_multicast_leave_group(struct net_bridge *br, | 885 | static void br_multicast_leave_group(struct net_bridge *br, |
