diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2014-10-05 17:27:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-06 17:14:54 -0400 |
commit | b47bd8d2795412143a23d2961033c126ce6914d9 (patch) | |
tree | ee5ac84b2ee7065f320089f67c11198423eaf57e /net/ipv4 | |
parent | ee6377147409a00c071b2da853059a7d59979fbc (diff) | |
download | op-kernel-dev-b47bd8d2795412143a23d2961033c126ce6914d9.zip op-kernel-dev-b47bd8d2795412143a23d2961033c126ce6914d9.tar.gz |
ipv4: igmp: fix v3 general query drop monitor false positive
In case we find a general query with non-zero number of sources, we
are dropping the skb as it's malformed.
RFC3376, section 4.1.8. Number of Sources (N):
This number is zero in a General Query or a Group-Specific Query,
and non-zero in a Group-and-Source-Specific Query.
Therefore, reflect that by using kfree_skb() instead of consume_skb().
Fixes: d679c5324d9a ("igmp: avoid drop_monitor false positives")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/igmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 4146153..fb70e3e 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -931,7 +931,7 @@ static bool igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb, in_dev->mr_qrv = ih3->qrv; if (!group) { /* general query */ if (ih3->nsrcs) - return false; /* no sources allowed */ + return true; /* no sources allowed */ igmp_gq_start_timer(in_dev); return false; } |