Skip to content

Commit

Permalink
Merge branch 'bugfix/bind_dhcps_netif' into 'master'
Browse files Browse the repository at this point in the history
fix(lwip/dhcp_server): Bind dhcps netif to avoid handling the dhcp packet from other netif

See merge request espressif/esp-idf!30537
  • Loading branch information
david-cermak committed May 9, 2024
2 parents 5f5f8c2 + 294b418 commit 3125367
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/lwip/apps/dhcpserver/dhcpserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,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
Expand Down

0 comments on commit 3125367

Please sign in to comment.