Re: [PATCH] tun: Fix unicast filter overflow

From: David Miller
Date: Sun Feb 08 2009 - 20:06:24 EST


From: Alex Williamson <alex.williamson@xxxxxx>
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@xxxxxx>

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/