From: Alex Williamson <alex.williamson@hp.com>
To: David Miller <davem@davemloft.net>
Cc: maxk@qualcomm.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] tun: Fix unicast filter overflow
Date: Sun, 08 Feb 2009 18:43:57 -0700 [thread overview]
Message-ID: <1234143837.20601.11.camel@2710p.home> (raw)
In-Reply-To: <20090208.170605.01154488.davem@davemloft.net>
On Sun, 2009-02-08 at 17:06 -0800, David Miller wrote:
> From: Alex Williamson <alex.williamson@hp.com>
> Date: Sat, 07 Feb 2009 10:45:13 -0700
>
> > Tap devices can make use of a small MAC filter set via the
> > TUNSETTXFILTER ioctl. The filter has a set of exact matches
> > plus a hash for imperfect filtering of additional multicast
> > addresses. The current code is unbalanced, adding unicast
> > addresses to the multicast hash, but only checking the hash
> > against multicast addresses. This results in the filter
> > dropping unicast addresses that overflow the exact filter.
> > The fix is simply to disable the filter by leaving count set
> > to zero if we find non-multicast addresses after the exact
> > match table is filled.
> >
> > Signed-off-by: Alex Williamson <alex.williamson@hp.com>
>
> Doesn't it make more sense to remove the multicast check
> in the filter check function?
>
> With your change, the user gets absolutely no indication
> that filtering has been completely disabled simply because
> they put too many unicast addresses into the filter. We
> just return zero, that's crazy.
Sure, that's another option, but we'd then need to figure out what to do
with TUN_FLT_ALLMULTI. Unicast would almost needs it's own hash list if
we want to support an allmulti mode that's less than promiscuous. The
return value of the ioctl is the number of exact filters, so the user
will know what happened. Thanks,
Alex
next prev parent reply other threads:[~2009-02-09 1:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-07 17:45 [PATCH] tun: Fix unicast filter overflow Alex Williamson
2009-02-09 1:06 ` David Miller
2009-02-09 1:43 ` Alex Williamson [this message]
2009-02-09 1:48 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234143837.20601.11.camel@2710p.home \
--to=alex.williamson@hp.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@qualcomm.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).