diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-06-13 09:34:03 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-06-13 09:34:03 +0000 |
commit | 841b730f98dcdb7cc2ea5963fb023c7c040348e8 (patch) | |
tree | 32ac03243f534c981666c20b5adc53c197c3a87a /target/linux/generic | |
parent | 6d213a644d61166c3991fafede3c9e36dffbdf1d (diff) | |
download | mtk-20170518-841b730f98dcdb7cc2ea5963fb023c7c040348e8.zip mtk-20170518-841b730f98dcdb7cc2ea5963fb023c7c040348e8.tar.gz mtk-20170518-841b730f98dcdb7cc2ea5963fb023c7c040348e8.tar.bz2 |
kernel: fix pkt_type filter mask for packet sockets
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 41178
Diffstat (limited to 'target/linux/generic')
8 files changed, 8 insertions, 8 deletions
diff --git a/target/linux/generic/patches-3.10/630-packet_socket_type.patch b/target/linux/generic/patches-3.10/630-packet_socket_type.patch index 14878d3..3a3c3bb 100644 --- a/target/linux/generic/patches-3.10/630-packet_socket_type.patch +++ b/target/linux/generic/patches-3.10/630-packet_socket_type.patch @@ -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: diff --git a/target/linux/generic/patches-3.12/630-packet_socket_type.patch b/target/linux/generic/patches-3.12/630-packet_socket_type.patch index 1e915f6..60e8401 100644 --- a/target/linux/generic/patches-3.12/630-packet_socket_type.patch +++ b/target/linux/generic/patches-3.12/630-packet_socket_type.patch @@ -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: diff --git a/target/linux/generic/patches-3.13/630-packet_socket_type.patch b/target/linux/generic/patches-3.13/630-packet_socket_type.patch index 1e915f6..60e8401 100644 --- a/target/linux/generic/patches-3.13/630-packet_socket_type.patch +++ b/target/linux/generic/patches-3.13/630-packet_socket_type.patch @@ -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: diff --git a/target/linux/generic/patches-3.14/630-packet_socket_type.patch b/target/linux/generic/patches-3.14/630-packet_socket_type.patch index d0247af..4f3f5e8 100644 --- a/target/linux/generic/patches-3.14/630-packet_socket_type.patch +++ b/target/linux/generic/patches-3.14/630-packet_socket_type.patch @@ -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: diff --git a/target/linux/generic/patches-3.3/630-packet_socket_type.patch b/target/linux/generic/patches-3.3/630-packet_socket_type.patch index 231b745..bcb3991 100644 --- a/target/linux/generic/patches-3.3/630-packet_socket_type.patch +++ b/target/linux/generic/patches-3.3/630-packet_socket_type.patch @@ -110,7 +110,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: diff --git a/target/linux/generic/patches-3.6/630-packet_socket_type.patch b/target/linux/generic/patches-3.6/630-packet_socket_type.patch index a630d1d..b43c145 100644 --- a/target/linux/generic/patches-3.6/630-packet_socket_type.patch +++ b/target/linux/generic/patches-3.6/630-packet_socket_type.patch @@ -110,7 +110,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: diff --git a/target/linux/generic/patches-3.8/630-packet_socket_type.patch b/target/linux/generic/patches-3.8/630-packet_socket_type.patch index 0671a28..d1a9ee2 100644 --- a/target/linux/generic/patches-3.8/630-packet_socket_type.patch +++ b/target/linux/generic/patches-3.8/630-packet_socket_type.patch @@ -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: diff --git a/target/linux/generic/patches-3.9/630-packet_socket_type.patch b/target/linux/generic/patches-3.9/630-packet_socket_type.patch index 9b700f5..ff57bb7 100644 --- a/target/linux/generic/patches-3.9/630-packet_socket_type.patch +++ b/target/linux/generic/patches-3.9/630-packet_socket_type.patch @@ -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: |