[PATCH] hostapd: Fix rnr ie length when no need to report bss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Allen.Ye" <allen.ye@xxxxxxxxxxxx>

Fix rnr ie length when no need to report bss. If we don't have content in
TBTT then don't need to change the length of the ie (*size_offset).

Signed-off-by: Allen.Ye <allen.ye@xxxxxxxxxxxx>
Signed-off-by: Michael Lee <michael-cy.lee@xxxxxxxxxxxx>
Signed-off-by: Money Wang <Money.Wang@xxxxxxxxxxxx>
---
 src/ap/ieee802_11.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index aa02fc624..5de63c279 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7484,8 +7484,10 @@ static u8 * hostapd_eid_rnr_iface(struct hostapd_data *hapd,
 		}
 
 		start = i;
-		*tbtt_count_pos = RNR_TBTT_INFO_COUNT(tbtt_count - 1);
-		*size_offset = (eid - size_offset) - 1;
+		if (tbtt_count != 0) {
+			*tbtt_count_pos = RNR_TBTT_INFO_COUNT(tbtt_count - 1);
+			*size_offset = (eid - size_offset) - 1;
+		}
 	}
 
 	if (tbtt_count == 0)
-- 
2.18.0


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux