kernel: fix pkt_type filter mask for packet sockets

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 41178
This commit is contained in:
Felix Fietkau
2014-06-13 09:34:03 +00:00
parent 6d213a644d
commit 841b730f98
9 changed files with 9 additions and 9 deletions

View File

@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+ return -EINVAL;
+ if (copy_from_user(&val, optval, sizeof(val)))
+ return -EFAULT;
+ po->pkt_type = val & ~PACKET_LOOPBACK;
+ po->pkt_type = val & ~BIT(PACKET_LOOPBACK);
+ return 0;
+ }
default: