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:
parent
9d3eb21ec4
commit
31ec556cef
1 changed files with 1 additions and 0 deletions
|
@ -263,6 +263,7 @@ static void fils_dhcp_handler(int sd, void *eloop_ctx, void *sock_ctx)
|
||||||
iph->ihl = sizeof(*iph) / 4;
|
iph->ihl = sizeof(*iph) / 4;
|
||||||
iph->tot_len = htons(sizeof(*iph) + sizeof(*udph) + (end - pos));
|
iph->tot_len = htons(sizeof(*iph) + sizeof(*udph) + (end - pos));
|
||||||
iph->ttl = 1;
|
iph->ttl = 1;
|
||||||
|
iph->protocol = 17; /* UDP */
|
||||||
iph->saddr = hapd->conf->dhcp_server.u.v4.s_addr;
|
iph->saddr = hapd->conf->dhcp_server.u.v4.s_addr;
|
||||||
iph->daddr = dhcp->client_ip;
|
iph->daddr = dhcp->client_ip;
|
||||||
iph->check = ip_checksum(iph, sizeof(*iph));
|
iph->check = ip_checksum(iph, sizeof(*iph));
|
||||||
|
|
Loading…
Reference in a new issue