mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
fix(lwip/dhcp_server): Bind dhcps netif to avoid handling the dhcp packet from other netifs
This commit is contained in:
parent
8ca7cc2f98
commit
226c7772b8
@ -1335,6 +1335,7 @@ err_t dhcps_start(dhcps_t *dhcps, struct netif *netif, ip4_addr_t ip)
|
||||
|
||||
dhcps->client_address_plus.addr = dhcps->dhcps_poll.start_ip.addr;
|
||||
|
||||
udp_bind_netif(dhcps->dhcps_pcb, dhcps->dhcps_netif);
|
||||
udp_bind(dhcps->dhcps_pcb, &netif->ip_addr, DHCPS_SERVER_PORT);
|
||||
udp_recv(dhcps->dhcps_pcb, handle_dhcp, dhcps);
|
||||
#if DHCPS_DEBUG
|
||||
|
Loading…
x
Reference in New Issue
Block a user