diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-02-12 17:27:56 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-02-12 17:27:56 +0900 |
commit | 41480ae7a383dcffa497decdd97b3cb2caaa18ec (patch) | |
tree | f1e3afce2cbd0bbc544cd86a73e5b3093eb081c4 /drivers/net/tun.c | |
parent | 508eb2ce222053e51e2243b7add8eeac85b1d250 (diff) | |
parent | 34aeb43e2d3800f4d8f96feb9f1b49cd506679d5 (diff) |
Merge branch 'sh/stable-updates'
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 d7b81e4fdd5..09fea31d3e3 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -157,10 +157,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. */ |