When we get an invalid length for a DHCP option, try and continue anyway.
When MTU is less than 576 we now ignore it instead of setting the MTU to 576.
+Build correctly on dietlibc, thanks to d00mer.
dhcpcd-3.0.16
RFC 2131 is full of confusion regarding MTU it seems as the effective minimum
#include <netinet/ether.h>
#include <netpacket/packet.h>
/* Only glibc-2.3 ships with ifaddrs.h */
-#if defined (__GLIBC__) && defined (__GLIBC_PREREQ) && __GLIBC_PREREQ (2,3)
-#define HAVE_IFADDRS_H
-#include <ifaddrs.h>
+#if defined (__GLIBC__) && defined (__GLIBC_PREREQ)
+# if __GLIBC_PREREQ (2,3)
+# define HAVE_IFADDRS_H
+# include <ifaddrs.h>
+# endif
#endif
#else
+#include <net/if_arp.h> /*dietlibc requires this - normally from
+ netinet/ether.h */
#include <net/if_dl.h>
#include <net/if_types.h>
#include <net/route.h>
#include <netinet/in.h>
#define HAVE_IFADDRS_H
-#include <ifaddrs.h>
+# include <ifaddrs.h>
#endif
#include <errno.h>