FILS: Fix the IP header protocol field in HLP DHCP response

The IP header should indicate that UDP is used in the message.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jeffin Mammen 2017-07-06 13:58:50 +03:00 committed by Jouni Malinen
parent 9d3eb21ec4
commit 31ec556cef

View file

@ -263,6 +263,7 @@ static void fils_dhcp_handler(int sd, void *eloop_ctx, void *sock_ctx)
iph->ihl = sizeof(*iph) / 4;
iph->tot_len = htons(sizeof(*iph) + sizeof(*udph) + (end - pos));
iph->ttl = 1;
iph->protocol = 17; /* UDP */
iph->saddr = hapd->conf->dhcp_server.u.v4.s_addr;
iph->daddr = dhcp->client_ip;
iph->check = ip_checksum(iph, sizeof(*iph));