summaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-02-09 23:22:21 -0800
committerDavid S. Miller <davem@davemloft.net>2009-02-09 23:22:21 -0800
commit0ecc103aec454288cbaa5a33d8960ab3467e8a11 (patch)
treed911ae41c303a575913b8aca2a49f4acaaf0fc93 /drivers/net/tun.c
parent0012985d184b7b9d4513eacd35771715471e06ef (diff)
parent4906f9985e310fc01f956256b0d58ac28b0dcb19 (diff)
downloadop-kernel-dev-0ecc103aec454288cbaa5a33d8960ab3467e8a11.zip
op-kernel-dev-0ecc103aec454288cbaa5a33d8960ab3467e8a11.tar.gz
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/gianfar.c
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 0476549..4825c52 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -260,10 +260,16 @@ static int update_filter(struct tap_filter *filter, void __user *arg)
nexact = n;
- /* The rest is hashed */
+ /* Remaining multicast addresses are hashed,
+ * unicast will leave the filter disabled. */
memset(filter->mask, 0, sizeof(filter->mask));
- for (; n < uf.count; n++)
+ for (; n < uf.count; n++) {
+ if (!is_multicast_ether_addr(addr[n].u)) {
+ err = 0; /* no filter */
+ goto done;
+ }
addr_hash_set(filter->mask, addr[n].u);
+ }
/* For ALLMULTI just set the mask to all ones.
* This overrides the mask populated above. */
OpenPOWER on IntegriCloud