From d43c092f171e683028e184af56333dab9ce79fcb Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Thu, 21 Jul 2016 13:19:04 +0200 Subject: [PATCH] PPP: restore PPPoE devices without Ethernet ARP support, i.e. PPPoE only devices Ethernet support is required for PPPoE but Ethernet support is only set by default in opt.h if ARP is enabled, which is wrong because the right condition is ARP and/or PPPoE, unfortunately PPPOE_SUPPORT can't be used in opt.h because it is not defined if ppp_opts.h is not included before opt.h in user code. Fixup the LWIP_ETHERNET configuration value in ppp_opts.h in order to force Ethernet support if PPPoE is enabled. Fixes: 3ad2ad2329 ("Remove reference to PPPOE_SUPPORT in opt.h - leads to compile errors because it has no default definition (only in ppp_opts.h)" --- src/include/netif/ppp/ppp_opts.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/include/netif/ppp/ppp_opts.h b/src/include/netif/ppp/ppp_opts.h index 75541f44..4d379a92 100644 --- a/src/include/netif/ppp/ppp_opts.h +++ b/src/include/netif/ppp/ppp_opts.h @@ -43,6 +43,11 @@ #ifndef PPPOE_SUPPORT #define PPPOE_SUPPORT 0 #endif +#if PPPOE_SUPPORT +/* PPPoE requires Ethernet support */ +#undef LWIP_ETHERNET +#define LWIP_ETHERNET 1 +#endif /* PPPOE_SUPPORT */ /** * PPPOL2TP_SUPPORT==1: Enable PPP Over L2TP