summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Brown <dustinb@codeaurora.org>2017-02-09 12:19:28 -0800
committerqcabuildsw <qcabuildsw@localhost>2017-02-12 18:31:39 -0800
commitd616a548e9f99a46f70de7fa73a7a3c2af011a55 (patch)
treee19b44a9c68c277a9c585d71829e1fec97494c4f
parent447bcb6523c92bc51f811952e0467685f60718f2 (diff)
qcacld-3.0: Make grat ARP KA source/target addresses the same
According to RFC 5227, both the source and target addresses in a gratuitous ARP packet should be the same. When enabling gratuitous ARP keepalive, set both source and target addresses to the host's IPv4 address. Change-Id: If467cc7d93adb67f88539ebed727689b61d42089 CRs-Fixed: 2004770
-rw-r--r--core/hdd/src/wlan_hdd_power.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index d04e8d5acdad..c617b30efc68 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -756,7 +756,6 @@ static int hdd_set_grat_arp_keepalive(hdd_adapter_t *adapter)
hdd_station_ctx_t *sta_ctx;
tSirKeepAliveReq req = {
.packetType = SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP,
- .destIpv4Addr = {0xff, 0xff, 0xff, 0xff},
.dest_macaddr = QDF_MAC_ADDR_BROADCAST_INITIALIZER,
};
@@ -783,6 +782,10 @@ static int hdd_set_grat_arp_keepalive(hdd_adapter_t *adapter)
return exit_code;
}
+ /* according to RFC5227, sender/target ip address should be the same */
+ qdf_mem_copy(&req.destIpv4Addr, &req.hostIpv4Addr,
+ sizeof(req.destIpv4Addr));
+
qdf_copy_macaddr(&req.bssid, &sta_ctx->conn_info.bssId);
req.timePeriod = hdd_ctx->config->infraStaKeepAlivePeriod;
req.sessionId = adapter->sessionId;