mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
kernel: fix pkt_type filter mask for packet sockets
Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41178 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -1447,7 +1447,7 @@ endif
|
||||
config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
|
||||
|
||||
config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
|
||||
config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG
|
||||
config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG ATH9K_TX99
|
||||
config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
|
||||
|
||||
config-$(call config_package,ath9k) += ATH9K
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user