sys-kernel/hardened sources: Fix wireless injection patch
This commit is contained in:
parent
a6f72be20c
commit
a942d75a90
@ -1,10 +1,9 @@
|
|||||||
AUX rtl8111_8168b.patch 480 SHA256 090e06bdef1e45febee18d9c05380262203214b9211deb9de938d247530458e4 SHA512 d4b1b4d9ee473937374fa6ba5b7582855569fd329366bd021f594c340d0fc783304399bc173de1144ef61f2e02157efb53515d8ea77c371ba31037b13e3e1475 WHIRLPOOL 393a81c7403448811d86fb9fb9ef0f385dd542f0bdc2ecbed2e85e9cec8bb36f8ad3f7ebaa4fbbb4c67a16a2b6ada0e1130885958112e1bb4103a5adf79e00c9
|
AUX 9000_wireless_injection.patch 1891 SHA256 f1dd5602c05858112357dc23c559b756e94810b0c3c8b30ce9662dd908e60be8 SHA512 cc8eba291ddc224af04439d9dd84455af4648a763e3006307320f00ff878cb11509e11b1a6434bf8e60f63c6c1680d9dd364fd130979a76f443852e13c24cc89 WHIRLPOOL 6cfcc32d03c2d893f14586ed7c111f89ba64eabf3e19b16019c198fc2876293f28a80c29110ce29a86caff7ef9a82f3352e98bff4e74e0ce8f2f66d510dd99f8
|
||||||
AUX wireless_injection.patch 2140 SHA256 0313d017d667e48b5ad59c74d893efca0afd39be2e8183e9756fdb0f8eaddb94 SHA512 093e4572db8a6877b114cd3925a5d23ff5358b579014d5e2781eea1f8bae631934bd6d7257c4316d913f9d847b9ad24bfd053bdc9c212c9c639cef82ae72a379 WHIRLPOOL 514ce59c72cf526fec1963d975c2b499e764a527264ece920deeef2f42a07fae34648b99dc72ccd556e4a00a3b08922ac93f718ef3f8d0605626219baffafaad
|
|
||||||
DIST deblob-3.9 116031 SHA256 0fb17070d5aaf226fca39f70df68b7d482e4f803e0ef974626440a28c26b5dc3 SHA512 e014add3728dc3fa0b938f3849ccba60e82354a811eefe6761036aa5e5b7bda39960758bb918506ed3cd0758360729144304227ab2cc3f5489813204f0053d3d WHIRLPOOL 4e65c3a6ba5dd5d850567fcd347167245b527b098ffa390bf0e9fb9778ddb06cd48553f697e2fe7cb793714b520dbb5b90b9948a339663a315e299272aca09ef
|
DIST deblob-3.9 116031 SHA256 0fb17070d5aaf226fca39f70df68b7d482e4f803e0ef974626440a28c26b5dc3 SHA512 e014add3728dc3fa0b938f3849ccba60e82354a811eefe6761036aa5e5b7bda39960758bb918506ed3cd0758360729144304227ab2cc3f5489813204f0053d3d WHIRLPOOL 4e65c3a6ba5dd5d850567fcd347167245b527b098ffa390bf0e9fb9778ddb06cd48553f697e2fe7cb793714b520dbb5b90b9948a339663a315e299272aca09ef
|
||||||
DIST deblob-check-3.9 557345 SHA256 60d05db20e7b50919ca44487d05e8faa9cca830318bd8d96625f0f75b252eeed SHA512 6b857380d495261c4d356639157f99f3ca3412388fd3b1c72b566c3bb6453c5a22ab7716e3b24e64a9b63dab912b07baccccfd0fca806ac0e0620efeef777b6a WHIRLPOOL 877c2c9b813466f9aa5cfecdc9ab93247bd2cdead457c9e0bd97da49d042d0a52262f9b4f8e9c83e397b57c5bb5a8fe2b61bb5f44d5a178a579cc9fff990941a
|
DIST deblob-check-3.9 557345 SHA256 60d05db20e7b50919ca44487d05e8faa9cca830318bd8d96625f0f75b252eeed SHA512 6b857380d495261c4d356639157f99f3ca3412388fd3b1c72b566c3bb6453c5a22ab7716e3b24e64a9b63dab912b07baccccfd0fca806ac0e0620efeef777b6a WHIRLPOOL 877c2c9b813466f9aa5cfecdc9ab93247bd2cdead457c9e0bd97da49d042d0a52262f9b4f8e9c83e397b57c5bb5a8fe2b61bb5f44d5a178a579cc9fff990941a
|
||||||
DIST genpatches-3.9-14.base.tar.xz 278412 SHA256 c5cc0e1e455e4ce751f11c33b59ce7a63540613ebe35371cda07bd8c4d7b2a4e SHA512 d09ecb9ec1418aa1c94ab70da477de19aa5f67c8d991856c8d29dd842182a86b93a274bca71bdeb95b9197674b22e6a6840b43ec103309124f855307dee255d5 WHIRLPOOL 25b86aaa6b58279d7e1e1b08d607fe3b4d993c1c7498815dda2fa2021f5e65a0264b4b612004a6c2d1bd534db6c843b7ca08871ee24fbe278e41d6c70fdb9273
|
DIST genpatches-3.9-14.base.tar.xz 278412 SHA256 c5cc0e1e455e4ce751f11c33b59ce7a63540613ebe35371cda07bd8c4d7b2a4e SHA512 d09ecb9ec1418aa1c94ab70da477de19aa5f67c8d991856c8d29dd842182a86b93a274bca71bdeb95b9197674b22e6a6840b43ec103309124f855307dee255d5 WHIRLPOOL 25b86aaa6b58279d7e1e1b08d607fe3b4d993c1c7498815dda2fa2021f5e65a0264b4b612004a6c2d1bd534db6c843b7ca08871ee24fbe278e41d6c70fdb9273
|
||||||
DIST hardened-patches-3.9.9-1.extras.tar.bz2 715576 SHA256 4bcecff04fbf8be900cb87b9493683c15a5f8b35ebb95b5483ae942e56a7d3db SHA512 7437b377ce27464c68819157284aa53d34e929de18d693913d59bf0a9081795b1a351be402946063a6ac384fa588c8e8eeab7e7956b98598e486ae7bda64ecb9 WHIRLPOOL b36c8723e08b7b68ce88e700c848a75d7fa3eb4707392a70939f6a19399c6f6757391c872739d923adf2e01a2278c7daa2508439540ccb4007639aefcbb04494
|
DIST hardened-patches-3.9.9-1.extras.tar.bz2 715576 SHA256 4bcecff04fbf8be900cb87b9493683c15a5f8b35ebb95b5483ae942e56a7d3db SHA512 7437b377ce27464c68819157284aa53d34e929de18d693913d59bf0a9081795b1a351be402946063a6ac384fa588c8e8eeab7e7956b98598e486ae7bda64ecb9 WHIRLPOOL b36c8723e08b7b68ce88e700c848a75d7fa3eb4707392a70939f6a19399c6f6757391c872739d923adf2e01a2278c7daa2508439540ccb4007639aefcbb04494
|
||||||
DIST linux-3.9.tar.xz 72104164 SHA256 60bc3e64ee5dc778de2cd7cd7640abf518a4c9d4f31b8ed624e16fad53f54541 SHA512 77fa521f42380409f8ab400c26f7b00e225cb075ef40834bb263325cfdcc3e65aef8511ec2fc2b50bbf4f50e226fb5ab07d7a479aaf09162adbbf318325d0790 WHIRLPOOL 668a8de30c7c3ccf6558cf0f29570f15e37ca7d599d1453afc3cab113d1b05fbd5b32646dd9ed798ceb61405a8754345da0740a53f467b825445028cda4bc698
|
DIST linux-3.9.tar.xz 72104164 SHA256 60bc3e64ee5dc778de2cd7cd7640abf518a4c9d4f31b8ed624e16fad53f54541 SHA512 77fa521f42380409f8ab400c26f7b00e225cb075ef40834bb263325cfdcc3e65aef8511ec2fc2b50bbf4f50e226fb5ab07d7a479aaf09162adbbf318325d0790 WHIRLPOOL 668a8de30c7c3ccf6558cf0f29570f15e37ca7d599d1453afc3cab113d1b05fbd5b32646dd9ed798ceb61405a8754345da0740a53f467b825445028cda4bc698
|
||||||
EBUILD hardened-sources-3.9.9-r1.ebuild 1628 SHA256 b844272b7037531683aa23d8442dd533a7bfc0d7f3fe88f821cc04bef033b23b SHA512 5a91abf06194865a9c4c289083fd4e62bb242ade9c4d81cb7578914b67f992c020a3626378111602181046ec0a6936be881df18598e230e442384f23cb7c37dc WHIRLPOOL d45c79b0b41e7f47ca3d9ef067a7a7d110b3a466dfb85cce486f4820540dd50e45d95d1e4b562db70af22d3b33df2eb0210615fe0d040abeb489f9db4e3e3c3e
|
EBUILD hardened-sources-3.9.9-r1.ebuild 1633 SHA256 104f06dd441e0509e45a7d0177b2aaab549dbd0f13462bc22b9b21d8484b96ba SHA512 9ef54d58c450114d98595c5d30ef3921574818f04267bd47ca3983b22e294aa6c8e9094e152d300735bbd302c893a0ff314b30d1bf32428c9bbc6d2aba358914 WHIRLPOOL 702febb57698eef118964a06922f1936ecf772c6464a39da55eeee2385c592b3a24d8e89f2e839c522043e6afaf19e790d97d1fdff34d8b2be9f15c33979dea3
|
||||||
MISC ebuild.diff 634 SHA256 9f820f10cdcfc1d047813a4b542f43a7dec47e5c3c66a786c33193835b11e816 SHA512 8eb7029cb490ccfa3da1a5b0b4f73e94bd170459f6b4f8b6e29dafdaae0e7275865173fd1a62776bacd6c3086727ce2a986772db4c047be4968e94c37877517c WHIRLPOOL 2672eff242f95d2be2f36090d43c4d5b5f72a8eff00d89e9991796418cf4911a2c41e1643a2e6126877ea9b47aca1bfd182e12667156e3e7cd0ef60a8024a532
|
MISC ebuild.diff 634 SHA256 9f820f10cdcfc1d047813a4b542f43a7dec47e5c3c66a786c33193835b11e816 SHA512 8eb7029cb490ccfa3da1a5b0b4f73e94bd170459f6b4f8b6e29dafdaae0e7275865173fd1a62776bacd6c3086727ce2a986772db4c047be4968e94c37877517c WHIRLPOOL 2672eff242f95d2be2f36090d43c4d5b5f72a8eff00d89e9991796418cf4911a2c41e1643a2e6126877ea9b47aca1bfd182e12667156e3e7cd0ef60a8024a532
|
||||||
MISC kernel-config-3.9.9-hardened 120842 SHA256 bc13f6644f45e7fa2f5019b758b9504d75a4cf4f3715c4696716131a7e49f1ae SHA512 e2d2c53b2d6a9a959c2b3e91cb1ca2fe9da91c432078bb98072006671fdaadd03c078cdde48e14ad83e3783b2f0467af124daf7bebd35ce7fc744995841cf61f WHIRLPOOL b3b432225b8dfb1b7ace65f6c5c8df5530d77ace9c54aa7bc5104aad00c33953cdc108875c0ab29e8f998e2b1326ffc852e02735ef13e0db1f7339aea1a1b963
|
MISC kernel-config-3.9.9-hardened 120842 SHA256 bc13f6644f45e7fa2f5019b758b9504d75a4cf4f3715c4696716131a7e49f1ae SHA512 e2d2c53b2d6a9a959c2b3e91cb1ca2fe9da91c432078bb98072006671fdaadd03c078cdde48e14ad83e3783b2f0467af124daf7bebd35ce7fc744995841cf61f WHIRLPOOL b3b432225b8dfb1b7ace65f6c5c8df5530d77ace9c54aa7bc5104aad00c33953cdc108875c0ab29e8f998e2b1326ffc852e02735ef13e0db1f7339aea1a1b963
|
||||||
|
@ -0,0 +1,52 @@
|
|||||||
|
diff -r 0de05c2ae1be drivers/net/wireless/rtl818x/rtl8187/dev.c
|
||||||
|
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c Sat Sep 29 20:29:54 2012 -0400
|
||||||
|
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c Sat Sep 29 20:37:29 2012 -0400
|
||||||
|
@@ -252,8 +252,18 @@
|
||||||
|
flags |= RTL818X_TX_DESC_FLAG_NO_ENC;
|
||||||
|
|
||||||
|
flags |= ieee80211_get_tx_rate(dev, info)->hw_value << 24;
|
||||||
|
+
|
||||||
|
+ // When this flag is set the firmware waits untill ALL fragments have
|
||||||
|
+ // reached the USB device. Then it sends the first fragment and waits
|
||||||
|
+ // for ACKS's. Of course in monitor mode it won't detect these ACK's.
|
||||||
|
if (ieee80211_has_morefrags(tx_hdr->frame_control))
|
||||||
|
- flags |= RTL818X_TX_DESC_FLAG_MOREFRAG;
|
||||||
|
+ {
|
||||||
|
+ // If info->control.vif is NULL it's most likely in monitor mode
|
||||||
|
+ if (info->control.vif != NULL && info->control.vif->type != NL80211_IFTYPE_MONITOR) {
|
||||||
|
+ flags |= RTL818X_TX_DESC_FLAG_MOREFRAG;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) {
|
||||||
|
flags |= RTL818X_TX_DESC_FLAG_RTS;
|
||||||
|
flags |= ieee80211_get_rts_cts_rate(dev, info)->hw_value << 19;
|
||||||
|
diff -r 0de05c2ae1be net/mac80211/tx.c
|
||||||
|
--- a/net/mac80211/tx.c Sat Sep 29 20:29:54 2012 -0400
|
||||||
|
+++ b/net/mac80211/tx.c Sat Sep 29 20:37:29 2012 -0400
|
||||||
|
@@ -1508,7 +1508,10 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- ieee80211_set_qos_hdr(sdata, skb);
|
||||||
|
+ // Don't overwrite QoS header in monitor mode
|
||||||
|
+ if (likely(info->control.vif->type != NL80211_IFTYPE_MONITOR)) {
|
||||||
|
+ ieee80211_set_qos_hdr(sdata, skb);
|
||||||
|
+ }
|
||||||
|
ieee80211_tx(sdata, skb, false, band);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff -r 0de05c2ae1be net/wireless/chan.c
|
||||||
|
--- a/net/wireless/chan.c Sat Sep 29 20:29:54 2012 -0400
|
||||||
|
+++ b/net/wireless/chan.c Sat Sep 29 20:37:29 2012 -0400
|
||||||
|
@@ -439,8 +439,8 @@
|
||||||
|
{
|
||||||
|
if (!rdev->ops->set_monitor_channel)
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
- if (!cfg80211_has_monitors_only(rdev))
|
||||||
|
- return -EBUSY;
|
||||||
|
+ //if (!cfg80211_has_monitors_only(rdev))
|
||||||
|
+ // return -EBUSY;
|
||||||
|
|
||||||
|
return rdev_set_monitor_channel(rdev, chandef);
|
||||||
|
}
|
@ -1,12 +0,0 @@
|
|||||||
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
|
|
||||||
index bbacb37..da46588 100644
|
|
||||||
--- a/drivers/net/ethernet/realtek/r8169.c
|
|
||||||
+++ b/drivers/net/ethernet/realtek/r8169.c
|
|
||||||
@@ -3766,6 +3766,7 @@ static void rtl_init_rxcfg(struct rtl8169_private *tp)
|
|
||||||
case RTL_GIGA_MAC_VER_22:
|
|
||||||
case RTL_GIGA_MAC_VER_23:
|
|
||||||
case RTL_GIGA_MAC_VER_24:
|
|
||||||
+ case RTL_GIGA_MAC_VER_34:
|
|
||||||
RTL_W32(RxConfig, RX128_INT_EN | RX_MULTI_EN | RX_DMA_BURST);
|
|
||||||
break;
|
|
||||||
default:
|
|
@ -1,63 +0,0 @@
|
|||||||
diff -ru linux-3.2.6/net/mac80211/tx.c linux-source-3.2.6_bt5r2/net/mac80211/tx.c
|
|
||||||
--- linux-3.2.6/net/mac80211/tx.c 2012-02-13 11:17:29.000000000 -0800
|
|
||||||
+++ linux-source-3.2.6_bt5r2/net/mac80211/tx.c 2012-02-17 07:11:21.000000000 -0800
|
|
||||||
@@ -686,7 +686,8 @@
|
|
||||||
} else if (tx->sta)
|
|
||||||
tx->sta->last_tx_rate = txrc.reported_rate;
|
|
||||||
|
|
||||||
- if (unlikely(!info->control.rates[0].count))
|
|
||||||
+ if (unlikely(!info->control.rates[0].count) ||
|
|
||||||
+ info->flags & IEEE80211_TX_CTL_NO_ACK)
|
|
||||||
info->control.rates[0].count = 1;
|
|
||||||
|
|
||||||
if (WARN_ON_ONCE((info->control.rates[0].count > 1) &&
|
|
||||||
@@ -792,11 +793,19 @@
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Packet injection may want to control the sequence
|
|
||||||
- * number, if we have no matching interface then we
|
|
||||||
- * neither assign one ourselves nor ask the driver to.
|
|
||||||
+ * number, so if an injected packet is found, skip
|
|
||||||
+ * renumbering it. Also make the packet NO_ACK to avoid
|
|
||||||
+ * excessive retries (ACKing and retrying should be
|
|
||||||
+ * handled by the injecting application).
|
|
||||||
+ * FIXME This may break hostapd and some other injectors.
|
|
||||||
+ * This should be done using a radiotap flag.
|
|
||||||
*/
|
|
||||||
- if (unlikely(info->control.vif->type == NL80211_IFTYPE_MONITOR))
|
|
||||||
+ if (unlikely((info->flags & IEEE80211_TX_CTL_INJECTED) &&
|
|
||||||
+ !(tx->sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES))) {
|
|
||||||
+ if (!ieee80211_has_morefrags(hdr->frame_control))
|
|
||||||
+ info->flags |= IEEE80211_TX_CTL_NO_ACK;
|
|
||||||
return TX_CONTINUE;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (unlikely(ieee80211_is_ctl(hdr->frame_control)))
|
|
||||||
return TX_CONTINUE;
|
|
||||||
diff -ru linux-3.2.6/net/wireless/chan.c linux-source-3.2.6_bt5r2/net/wireless/chan.c
|
|
||||||
--- linux-3.2.6/net/wireless/chan.c 2012-02-13 11:17:29.000000000 -0800
|
|
||||||
+++ linux-source-3.2.6_bt5r2/net/wireless/chan.c 2012-02-17 07:10:38.000000000 -0800
|
|
||||||
@@ -82,9 +82,12 @@
|
|
||||||
{
|
|
||||||
struct ieee80211_channel *chan;
|
|
||||||
int result;
|
|
||||||
+ struct wireless_dev *mon_dev = NULL;
|
|
||||||
|
|
||||||
- if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)
|
|
||||||
+ if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR) {
|
|
||||||
+ mon_dev = wdev;
|
|
||||||
wdev = NULL;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if (wdev) {
|
|
||||||
ASSERT_WDEV_LOCK(wdev);
|
|
||||||
@@ -131,5 +134,8 @@
|
|
||||||
if (wdev)
|
|
||||||
wdev->channel = chan;
|
|
||||||
|
|
||||||
+ if (mon_dev)
|
|
||||||
+ mon_dev->channel = chan;
|
|
||||||
+
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
@ -33,7 +33,7 @@ RDEPEND=">=sys-devel/gcc-4.5"
|
|||||||
|
|
||||||
pkg_setup() {
|
pkg_setup() {
|
||||||
if use injection; then
|
if use injection; then
|
||||||
UNIPATCH_LIST+=" ${FILESDIR}/wireless_injection.patch"
|
UNIPATCH_LIST+=" ${FILESDIR}/9000_wireless_injection.patch"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user