From 74691ea7831fe155a54d5784939ad523cca1c3c7 Mon Sep 17 00:00:00 2001 From: zhouji92 <956133287@qq.com> Date: Mon, 18 Jan 2021 15:02:28 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8D=E4=BD=BF=E7=94=A8lwi?= =?UTF-8?q?p=202.1.2=E4=BD=9C=E4=B8=BA=E5=8D=8F=E8=AE=AE=E6=A0=88=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E4=BD=BF=E8=83=BDdhcp=20server=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/net/lwip_dhcpd/SConscript | 2 +- components/net/lwip_dhcpd/dhcp_server.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/components/net/lwip_dhcpd/SConscript b/components/net/lwip_dhcpd/SConscript index 16c673036a..837eb043e4 100644 --- a/components/net/lwip_dhcpd/SConscript +++ b/components/net/lwip_dhcpd/SConscript @@ -2,7 +2,7 @@ from building import * cwd = GetCurrentDir() -if GetDepend('RT_USING_LWIP202') or GetDepend('RT_USING_LWIP210') : +if GetDepend('RT_USING_LWIP202') or GetDepend('RT_USING_LWIP212') : src = ['dhcp_server_raw.c'] else: src = ['dhcp_server.c'] diff --git a/components/net/lwip_dhcpd/dhcp_server.c b/components/net/lwip_dhcpd/dhcp_server.c index 93b4ad16f0..b37d038b86 100644 --- a/components/net/lwip_dhcpd/dhcp_server.c +++ b/components/net/lwip_dhcpd/dhcp_server.c @@ -80,6 +80,22 @@ #define LWIP_DHCP 1 #include +#ifndef DHCP_CLIENT_PORT +#define DHCP_CLIENT_PORT 68 +#endif + +#ifndef DHCP_SERVER_PORT +#define DHCP_SERVER_PORT 67 +#endif + +#ifndef ETHADDR32_COPY +#define ETHADDR32_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) +#endif + +#ifndef ETHADDR16_COPY +#define ETHADDR16_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) +#endif + /* buffer size for receive DHCP packet */ #define BUFSZ 1024