Merge pull request #1875 from mdlemay/fix-dhcp-ipv6

galileo: Omit DHCP code when IPv6 is enabled
This commit is contained in:
Nicolas Tsiftes 2016-09-27 17:04:23 +02:00 committed by GitHub
commit 272c7b92d0

View file

@ -44,9 +44,8 @@ const linkaddr_t linkaddr_null = { { 0, 0, 0, 0, 0, 0 } };
#define HOST_IP SUBNET_IP, 2 #define HOST_IP SUBNET_IP, 2
#define GATEWAY_IP SUBNET_IP, 1 #define GATEWAY_IP SUBNET_IP, 1
#define NAMESERVER_IP GATEWAY_IP #define NAMESERVER_IP GATEWAY_IP
#endif
PROCESS(dhcp_process, "DHCP"); PROCESS(dhcp_process, "DHCP");
#endif
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
@ -74,11 +73,14 @@ eth_init(void)
#endif #endif
process_start(&eth_process, NULL); process_start(&eth_process, NULL);
#if !NETSTACK_CONF_WITH_IPV6
/* Comment out the following line to disable DHCP and simply use the static /* Comment out the following line to disable DHCP and simply use the static
* IP configuration setup above. * IP configuration setup above.
*/ */
process_start(&dhcp_process, NULL); process_start(&dhcp_process, NULL);
#endif
} }
#if !NETSTACK_CONF_WITH_IPV6
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
PROCESS_THREAD(dhcp_process, ev, data) PROCESS_THREAD(dhcp_process, ev, data)
{ {
@ -123,3 +125,4 @@ dhcpc_unconfigured(const struct dhcpc_state *s)
printf("DHCP unconfigured.\n"); printf("DHCP unconfigured.\n");
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#endif