summaryrefslogtreecommitdiff
path: root/components/net
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-07-24 00:23:50 +0000
committer[email protected] <[email protected]>2012-07-24 00:23:50 +0000
commitee4da4b03ec72a75b20ea2e4325fa400712c5588 (patch)
treebda65ec9a88e8e713db1afc50560d9245966c106 /components/net
parent1fc6491671e289acbe3759ad2e647dd8d2a172ae (diff)
Add DHCP flag when LWIP_DHCP was defined.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2230 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/net')
-rw-r--r--components/net/lwip/src/netif/ethernetif.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/net/lwip/src/netif/ethernetif.c b/components/net/lwip/src/netif/ethernetif.c
index a4fb54a081..b1bcd04ca1 100644
--- a/components/net/lwip/src/netif/ethernetif.c
+++ b/components/net/lwip/src/netif/ethernetif.c
@@ -161,6 +161,11 @@ rt_err_t eth_device_init(struct eth_device * dev, char *name)
{
rt_uint8_t flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP;
+#if LWIP_DHCP
+ /* DHCP support */
+ flags |= NETIF_FLAG_DHCP;
+#endif
+
#if LWIP_IGMP
/* IGMP support */
flags |= NETIF_FLAG_IGMP;