diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-10 10:22:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-10 10:22:21 +0300 |
commit | 0ecc103aec454288cbaa5a33d8960ab3467e8a11 (patch) | |
tree | d911ae41c303a575913b8aca2a49f4acaaf0fc93 /drivers/net/tun.c | |
parent | 0012985d184b7b9d4513eacd35771715471e06ef (diff) | |
parent | 4906f9985e310fc01f956256b0d58ac28b0dcb19 (diff) | |
download | linux-0ecc103aec454288cbaa5a33d8960ab3467e8a11.tar.xz |
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.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 0476549841ac..4825c52924bf 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. */ |