kernel: fix pkt_type filter mask for packet sockets
[15.05/openwrt.git] / target / linux / generic / patches-3.10 / 630-packet_socket_type.patch
index 14878d3..3a3c3bb 100644 (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: