|
@@ -157,10 +157,16 @@ static int update_filter(struct tap_filter *filter, void __user *arg)
|
|
|
|
|
|
nexact = n;
|
|
nexact = n;
|
|
|
|
|
|
- /* The rest is hashed */
|
|
|
|
|
|
+ /* Remaining multicast addresses are hashed,
|
|
|
|
+ * unicast will leave the filter disabled. */
|
|
memset(filter->mask, 0, sizeof(filter->mask));
|
|
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);
|
|
addr_hash_set(filter->mask, addr[n].u);
|
|
|
|
+ }
|
|
|
|
|
|
/* For ALLMULTI just set the mask to all ones.
|
|
/* For ALLMULTI just set the mask to all ones.
|
|
* This overrides the mask populated above. */
|
|
* This overrides the mask populated above. */
|