Browse Source

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>
Jeffin Mammen 7 years ago
parent
commit
31ec556cef
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/ap/fils_hlp.c

+ 1 - 0
src/ap/fils_hlp.c

@@ -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));