aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-02-10 02:22:21 -0500
committerDavid S. Miller <davem@davemloft.net>2009-02-10 02:22:21 -0500
commit0ecc103aec454288cbaa5a33d8960ab3467e8a11 (patch)
treed911ae41c303a575913b8aca2a49f4acaaf0fc93 /drivers/net/tun.c
parent0012985d184b7b9d4513eacd35771715471e06ef (diff)
parent4906f9985e310fc01f956256b0d58ac28b0dcb19 (diff)
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 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)
260 260
261 nexact = n; 261 nexact = n;
262 262
263 /* The rest is hashed */ 263 /* Remaining multicast addresses are hashed,
264 * unicast will leave the filter disabled. */
264 memset(filter->mask, 0, sizeof(filter->mask)); 265 memset(filter->mask, 0, sizeof(filter->mask));
265 for (; n < uf.count; n++) 266 for (; n < uf.count; n++) {
267 if (!is_multicast_ether_addr(addr[n].u)) {
268 err = 0; /* no filter */
269 goto done;
270 }
266 addr_hash_set(filter->mask, addr[n].u); 271 addr_hash_set(filter->mask, addr[n].u);
272 }
267 273
268 /* For ALLMULTI just set the mask to all ones. 274 /* For ALLMULTI just set the mask to all ones.
269 * This overrides the mask populated above. */ 275 * This overrides the mask populated above. */